/* ===== فونت و متغیرها ===== */
:root {
    --loc-primary: #16a34a;
    --loc-primary-dark: #15803d;
    --loc-primary-light: #22c55e;
    --loc-accent: #f0fdf4;
    --loc-text: #1f2937;
    --loc-muted: #6b7280;
    --loc-border: #e5e7eb;
    --loc-shadow: 0 10px 40px rgba(22, 163, 74, 0.12);
}

/* ===== کانتینر اصلی ===== */
.loc-calculator {
    max-width: 620px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--loc-shadow);
    direction: rtl;
    text-align: right;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    animation: locFadeInUp 0.6s ease;
}

/* نوار رنگی بالای کارت */
.loc-calculator::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--loc-primary-light), var(--loc-primary), var(--loc-primary-dark));
}

@keyframes locFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== عنوان ===== */
.loc-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 26px;
    color: var(--loc-text);
    text-align: center;
    letter-spacing: -0.3px;
}
.loc-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, var(--loc-primary-light), var(--loc-primary));
    border-radius: 2px;
}

/* ===== تب‌ها ===== */
.loc-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 26px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 14px;
}
.loc-tab {
    flex: 1;
    padding: 13px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--loc-muted);
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.loc-tab:hover {
    color: var(--loc-primary-dark);
}
.loc-tab.active {
    background: #ffffff;
    color: var(--loc-primary-dark);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* ===== پنل‌ها با انیمیشن ===== */
.loc-panel {
    animation: locSlideIn 0.4s ease;
}
@keyframes locSlideIn {
    from { opacity: 0; transform: translateX(15px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===== فیلدها ===== */
.loc-field {
    margin-bottom: 18px;
}
.loc-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--loc-text);
}
.loc-field input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--loc-border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: var(--loc-text);
    box-sizing: border-box;
    transition: all 0.25s ease;
    background: #fafafa;
}
.loc-field input:focus {
    outline: none;
    border-color: var(--loc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

/* ===== فیلدهای فرعی سینی (تعداد حفره / حجم حفره) ===== */
.loc-tray-extra {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}
.loc-tray-extra .loc-field {
    flex: 1;
    margin-bottom: 0;
}

/* ===== بخش نسبت ===== */
.loc-mix {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding: 18px;
    background: var(--loc-accent);
    border-radius: 14px;
    border: 1px dashed #bbf7d0;
}
.loc-mix .loc-field {
    flex: 1;
    margin-bottom: 0;
}

.loc-hint {
    font-size: 12.5px;
    color: var(--loc-muted);
    margin: 12px 0 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.loc-hint::before {
    content: 'ℹ️';
    font-size: 14px;
}

/* ===== دکمه محاسبه ===== */
.loc-calc-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--loc-primary-light), var(--loc-primary-dark));
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}
.loc-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.4);
}
.loc-calc-btn:active {
    transform: translateY(0);
}
/* افکت موج هنگام کلیک */
.loc-calc-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}
.loc-calc-btn:active::after {
    width: 300px;
    height: 300px;
    transition: 0s;
}

/* ===== نتیجه ===== */
.loc-result {
    margin-top: 28px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.loc-result.loc-show {
    opacity: 1;
    transform: translateY(0);
}
.loc-result h3 {
    margin: 0 0 18px;
    color: var(--loc-text);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

/* کارت‌های نتیجه اصلی */
.loc-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}
.loc-card {
    flex: 1;
    padding: 22px 16px;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.loc-card-coco {
    background: linear-gradient(135deg, #92400e, #b45309);
}
.loc-card-peat {
    background: linear-gradient(135deg, #166534, #15803d);
}
.loc-card-icon {
    font-size: 30px;
    margin-bottom: 8px;
    display: block;
}
.loc-card-value {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    margin: 6px 0;
}
.loc-card-label {
    font-size: 13px;
    opacity: 0.9;
}
.loc-card-unit {
    font-size: 15px;
    font-weight: 600;
}

/* جدول جزئیات */
.loc-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #f9fafb;
    border-radius: 14px;
    overflow: hidden;
}
.loc-result-table td {
    padding: 14px 18px;
    font-size: 15px;
    border-bottom: 1px solid var(--loc-border);
}
.loc-result-table tr:last-child td {
    border-bottom: none;
}
.loc-result-table td:first-child {
    color: var(--loc-muted);
    font-weight: 500;
}
.loc-result-table td:last-child {
    text-align: left;
    font-weight: 800;
    color: var(--loc-text);
    font-size: 16px;
}

/* ===== خطا ===== */
.loc-error {
    margin-top: 20px;
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-right: 4px solid #ef4444;
    border-radius: 12px;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 500;
    animation: locShake 0.4s ease;
}
@keyframes locShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ===== مودال شماره تماس (افکت شیشه‌ای مات) ===== */
body.loc-modal-open {
    overflow: hidden;
}

.loc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 40, 25, 0.35);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, backdrop-filter 0.35s ease, visibility 0.35s;
}
.loc-modal-overlay.loc-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.loc-modal-glass {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 34px 28px;
    text-align: center;
    direction: rtl;
    font-family: inherit;
    color: var(--loc-text);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    transform: translateY(24px) scale(0.94);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
.loc-modal-overlay.loc-show .loc-modal-glass {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.loc-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border: none;
     border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.5);
    color: #c2c2c2 !important;
    font-size: 30px !important;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
	margin-left:300px;
	
}
.loc-modal-close:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--loc-text);
}

.loc-modal-icon {
    font-size: 40px;
    margin-bottom: 10px;
    animation: locPulse 2s ease-in-out infinite;
}
@keyframes locPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.loc-modal-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--loc-text);
}
.loc-modal-desc {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--loc-muted);
    line-height: 1.7;
}

.loc-phone-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 18px;
    letter-spacing: 1px;
    text-align: center;
    font-family: inherit;
    color: var(--loc-text);
    background: rgba(255, 255, 255, 0.65);
    box-sizing: border-box;
    direction: ltr;
    transition: all 0.25s ease;
}
.loc-phone-input:focus {
    outline: none;
    border-color: var(--loc-primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}
.loc-phone-input.loc-input-error {
    border-color: #ef4444;
    animation: locShake 0.4s ease;
}

.loc-phone-error {
    display: none;
    margin: -6px 0 16px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 600;
}

.loc-modal-submit {
    position: relative;
    margin-top: 4px;
}
.loc-modal-submit .loc-btn-spinner {
    display: none;
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
}
.loc-modal-submit.loc-loading {
    cursor: not-allowed;
    opacity: 0.85;
}
.loc-modal-submit.loc-loading .loc-btn-text {
    visibility: hidden;
}
.loc-modal-submit.loc-loading .loc-btn-spinner {
    display: block;
    animation: locSpin 0.8s linear infinite;
}
@keyframes locSpin {
    to { transform: translate(50%, -50%) rotate(360deg); }
}

/* ===== واکنش‌گرا ===== */
@media (max-width: 520px) {
    .loc-calculator { padding: 22px; margin: 16px; border-radius: 16px; }
    .loc-mix { flex-direction: column; gap: 0; }
    .loc-mix .loc-field { margin-bottom: 14px; }
    .loc-mix .loc-field:last-child { margin-bottom: 0; }
    .loc-tray-extra { flex-direction: column; gap: 0; }
    .loc-tray-extra .loc-field { margin-bottom: 14px; }
    .loc-tray-extra .loc-field:last-child { margin-bottom: 0; }
    .loc-cards { flex-direction: column; }
    .loc-card-value { font-size: 34px; }
    .loc-title { font-size: 19px; }
    .loc-modal-glass { padding: 28px 20px; }
}