/* Al-Khibrat Building Materials Calculators */
.rt-wrap{--rt-primary:#0b5ed7;--rt-accent:#16a34a;--rt-text:#1b1f29;--rt-muted:#5d6577;--rt-border:#e3e7ef;--rt-soft:#f5f7fb;direction:rtl;text-align:right;color:var(--rt-text);font-family:inherit;margin:24px 0;line-height:1.7}
.rt-wrap *{box-sizing:border-box}
.rt-card{background:#fff;border:1px solid var(--rt-border);border-radius:18px;padding:26px;box-shadow:0 10px 30px rgba(17,24,39,.06)}
.rt-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:20px}
.rt-icon{font-size:30px;line-height:1;background:var(--rt-soft);border-radius:14px;padding:12px;flex:none}
.rt-title{font-size:20px;font-weight:700}
.rt-sub{color:var(--rt-muted);font-size:14px}
.rt-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px 16px}
.rt-field{display:block;margin:0 0 14px}
.rt-field>span{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
.rt-wrap input[type=text],.rt-wrap input[type=tel],.rt-wrap input[type=number],.rt-wrap select,.rt-wrap textarea{width:100%;min-height:46px;border:1px solid var(--rt-border);border-radius:12px;padding:10px 14px;font:inherit;font-size:15px;background:#fff;color:var(--rt-text);transition:border-color .2s,box-shadow .2s}
.rt-wrap textarea{min-height:90px}
.rt-wrap input:focus,.rt-wrap select:focus,.rt-wrap textarea:focus{outline:0;border-color:var(--rt-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--rt-primary) 18%,transparent)}
.rt-wrap input[type=color]{width:64px;height:46px;border:1px solid var(--rt-border);border-radius:12px;padding:4px;background:#fff;cursor:pointer}
.rt-wrap input[type=file]{width:100%;padding:18px;border:2px dashed var(--rt-border);border-radius:14px;background:var(--rt-soft);cursor:pointer}
.rt-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}
.rt-checks label,.rt-inline{display:flex;gap:8px;align-items:center;background:var(--rt-soft);border:1px solid var(--rt-border);border-radius:10px;padding:9px 12px;font-size:14px;cursor:pointer}
.rt-checks small{color:var(--rt-muted);margin-inline-start:auto}
.rt-inline{margin:4px 0 14px}
.rt-hint{font-size:13px;color:var(--rt-muted);margin:0 0 14px}
.rt-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:12px;padding:12px 20px;font:inherit;font-weight:700;font-size:15px;cursor:pointer;text-decoration:none!important;transition:transform .15s,opacity .2s,background .2s}
.rt-btn:hover{transform:translateY(-1px)}
.rt-btn:disabled{opacity:.6;cursor:wait;transform:none}
.rt-btn-primary{background:var(--rt-primary);color:#fff!important}
.rt-submit{width:100%;min-height:52px;font-size:17px;margin-top:6px}
.rt-btn-ghost{background:var(--rt-soft);color:var(--rt-text)!important;border:1px solid var(--rt-border);font-size:14px;padding:10px 14px}
.rt-btn-cta{display:flex;width:100%;margin-top:18px;background:#25d366;color:#fff!important;min-height:52px;font-size:16px}
.rt-progress{margin-top:20px;background:var(--rt-soft);border-radius:14px;padding:16px}
.rt-progress-top{display:flex;justify-content:space-between;font-weight:600;margin-bottom:10px}
.rt-pct{color:var(--rt-primary);font-variant-numeric:tabular-nums;direction:ltr}
.rt-bar{height:10px;background:#e2e7f0;border-radius:99px;overflow:hidden}
.rt-bar span{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--rt-accent),var(--rt-primary));transition:width .1s linear}
.rt-result{margin-top:22px;animation:rtIn .4s ease}
@keyframes rtIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.rt-result-head{font-size:18px;font-weight:700;margin-bottom:14px}
.rt-highlight{text-align:center;border:2px solid var(--rt-primary);border-radius:16px;padding:18px;margin-bottom:14px;background:color-mix(in srgb,var(--rt-primary) 5%,#fff)}
.rt-hl-label{color:var(--rt-muted);font-weight:600}
.rt-hl-value{font-size:30px;font-weight:800;color:var(--rt-primary);line-height:1.4}
.rt-hl-sub{font-size:14px;color:var(--rt-muted)}
.rt-verdict{border-radius:12px;padding:12px 14px;margin-bottom:14px;font-weight:600;font-size:14px}
.rt-ok{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0}
.rt-bad{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.rt-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--rt-border);border-radius:12px;overflow:hidden;margin:0 0 12px}
.rt-table th,.rt-table td{padding:11px 14px;border-bottom:1px solid var(--rt-border);text-align:right;font-size:15px;vertical-align:top}
.rt-table tr:last-child th,.rt-table tr:last-child td{border-bottom:0}
.rt-table th{background:var(--rt-soft);font-weight:600;width:50%}
.rt-table td{font-weight:700;word-break:break-word}
.rt-note{font-size:13px;color:var(--rt-muted);margin:6px 0}
.rt-error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-radius:12px;padding:12px 14px;font-weight:600}
.rt-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.rt-share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:14px;font-size:14px;font-weight:600}
.rt-s{display:inline-block;padding:7px 13px;border-radius:99px;color:#fff!important;background:#374151;text-decoration:none!important;font-size:13px}
.rt-s-wa{background:#25d366}.rt-s-x{background:#000}.rt-s-fb{background:#1877f2}.rt-s-li{background:#0a66c2}.rt-s-tg{background:#229ed9}
.rt-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.rt-tab{flex:1;min-width:180px;border:1px solid var(--rt-border);background:var(--rt-soft);border-radius:12px;padding:11px;font:inherit;font-weight:700;cursor:pointer;color:var(--rt-text)}
.rt-tab.is-active{background:var(--rt-primary);color:#fff;border-color:var(--rt-primary)}
.rt-wa-link{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.rt-wa-link input{flex:1 1 260px}
.rt-qr{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.rt-qr img{width:200px;height:200px;border:1px solid var(--rt-border);border-radius:12px;image-rendering:pixelated;background:#fff}
.rt-qr-btns{display:flex;flex-direction:column;gap:8px}
.rt-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-bottom:14px}
.rt-gallery figure{margin:0;border:1px solid var(--rt-border);border-radius:14px;overflow:hidden;background:#fff}
.rt-thumb{background:repeating-conic-gradient(#eef1f6 0 25%,#fff 0 50%) 0 0/16px 16px;display:flex;align-items:center;justify-content:center;height:180px;padding:10px}
.rt-thumb img{max-width:100%;max-height:100%;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.rt-gallery figcaption{padding:10px;display:flex;flex-direction:column;gap:6px;font-size:13px}
.rt-gallery figcaption span{color:var(--rt-muted)}
.rt-hub{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.rt-hub-card{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid var(--rt-border);border-radius:18px;padding:22px;text-decoration:none!important;color:var(--rt-text)!important;transition:transform .2s,box-shadow .2s,border-color .2s}
.rt-hub-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(17,24,39,.1);border-color:var(--rt-primary)}
.rt-hub-icon{font-size:34px}
.rt-hub-card strong{font-size:17px;line-height:1.5}
.rt-hub-card span{font-size:14px;color:var(--rt-muted)}
.rt-hub-card em{font-style:normal;color:var(--rt-primary);font-weight:700;margin-top:auto}
@media (max-width:600px){.rt-card{padding:18px;border-radius:14px}.rt-hl-value{font-size:24px}.rt-table th,.rt-table td{font-size:14px;padding:9px 10px}}
/* Theme button overrides: brand hover (accent background, dark text) */
.rt-wrap button.rt-btn-primary,.rt-wrap a.rt-btn-primary{background:var(--rt-primary)!important;color:#fff!important;border:0!important}
.rt-wrap button.rt-btn-primary:hover,.rt-wrap button.rt-btn-primary:focus-visible,.rt-wrap a.rt-btn-primary:hover{background:var(--rt-accent)!important;color:#111!important}
.rt-wrap button.rt-btn-ghost,.rt-wrap a.rt-btn-ghost{background:var(--rt-soft)!important;color:var(--rt-text)!important;border:1px solid var(--rt-border)!important}
.rt-wrap button.rt-btn-ghost:hover,.rt-wrap a.rt-btn-ghost:hover{background:var(--rt-accent)!important;color:#111!important;border-color:var(--rt-accent)!important}
.rt-wrap button.rt-tab{background:var(--rt-soft)!important;color:var(--rt-text)!important}
.rt-wrap button.rt-tab.is-active{background:var(--rt-primary)!important;color:#fff!important}
.rt-wrap button.rt-tab:hover{border-color:var(--rt-accent)!important}
.rt-wrap button.rt-submit:disabled{background:var(--rt-primary)!important;color:#fff!important}
.rt-next{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px;font-size:14px}
.rt-next a{background:var(--rt-soft);border:1px solid var(--rt-border);border-radius:99px;padding:6px 14px;color:var(--rt-text)!important;text-decoration:none!important;font-weight:600}
.rt-next a:hover{border-color:var(--rt-primary)}
.rt-unit{font-size:12px;color:var(--rt-muted);font-weight:400}
.rt-wrap [hidden]{display:none!important}
