/* Vintajj Delivery Calculator — UI styles (v25 theme palette) */

.v25-calc-wrap {
    max-width: 880px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1C1917;
}

.v25-calc-lead {
    font-size: 16px;
    line-height: 1.6;
    color: #57534E;
    margin: 0 0 28px 0;
}

/* ===== FORM ===== */

.v25-calc-form {
    background: #ffffff;
    border: 1px solid #E7E5E4;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.v25-calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.v25-calc-row-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.v25-calc-field {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.v25-calc-field input,
.v25-calc-field select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.v25-calc-field label {
    font-size: 13px;
    font-weight: 500;
    color: #57534E;
    margin-bottom: 6px;
}

.v25-calc-hint {
    color: #A8A29E;
    font-weight: 400;
    font-size: 12px;
}

.v25-calc-field input,
.v25-calc-field select {
    font-family: inherit;
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid #D6D3D1;
    border-radius: 8px;
    background: #FAFAF9;
    color: #1C1917;
    transition: border-color .15s, background .15s;
}

.v25-calc-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.v25-calc-field input:focus,
.v25-calc-field select:focus {
    outline: none;
    border-color: #A65A3C;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(166,90,60,0.1);
}

/* Autocomplete dropdown */
.v25-calc-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #D6D3D1;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 20;
    display: none;
}

.v25-calc-autocomplete.visible { display: block; }

.v25-calc-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #F5F5F4;
    font-size: 14px;
}

.v25-calc-autocomplete-item:last-child { border-bottom: none; }

.v25-calc-autocomplete-item:hover,
.v25-calc-autocomplete-item.active {
    background: #FEF7F2;
    color: #A65A3C;
}

.v25-calc-autocomplete-region {
    font-size: 12px;
    color: #A8A29E;
    margin-left: 6px;
}

/* Submit button */
.v25-calc-submit {
    width: 100%;
    background: linear-gradient(135deg, #A65A3C 0%, #8A4A32 100%);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform .1s, box-shadow .2s;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.v25-calc-submit:hover {
    box-shadow: 0 4px 14px rgba(166,90,60,0.3);
}

.v25-calc-submit:active {
    transform: scale(0.98);
}

.v25-calc-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ===== LOADING / ERROR ===== */

.v25-calc-loading {
    text-align: center;
    padding: 32px 20px;
    color: #78716C;
    font-size: 15px;
}

.v25-calc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #E7E5E4;
    border-top-color: #A65A3C;
    border-radius: 50%;
    animation: v25CalcSpin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes v25CalcSpin {
    to { transform: rotate(360deg); }
}

.v25-calc-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ===== RESULTS ===== */

.v25-calc-results {
    background: #ffffff;
    border: 1px solid #E7E5E4;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.v25-calc-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #E7E5E4;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.v25-calc-tab {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #78716C;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}

.v25-calc-tab:hover { color: #1C1917; }

.v25-calc-tab-active {
    color: #A65A3C;
    border-bottom-color: #A65A3C;
}

.v25-calc-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Option card */
.v25-calc-option {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid #E7E5E4;
    border-radius: 10px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.v25-calc-option:hover {
    border-color: #D6D3D1;
    background: #FAFAF9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.v25-calc-option-left {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}

.v25-calc-carrier-tag {
    flex-shrink: 0;
    min-width: 44px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    border-radius: 6px;
    text-transform: uppercase;
}

.v25-calc-option-main {
    min-width: 0;
}

.v25-calc-option-carrier {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #57534E;
    margin-bottom: 2px;
}

.v25-calc-option-service {
    font-size: 15px;
    font-weight: 500;
    color: #1C1917;
    margin-bottom: 4px;
    line-height: 1.3;
}

.v25-calc-option-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Route pill */
.v25-calc-route {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #F5F5F4;
    border-radius: 12px;
    font-size: 12px;
    color: #57534E;
}

.v25-calc-route-from,
.v25-calc-route-to {
    font-weight: 500;
}

.v25-calc-route-arrow {
    color: #A8A29E;
    font-size: 11px;
}

/* Badges */
.v25-calc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.v25-calc-badge-cheap {
    background: #E8F5E9;
    color: #2E7D32;
}

.v25-calc-badge-fast {
    background: #E3F2FD;
    color: #1565C0;
}

.v25-calc-option-eta {
    text-align: right;
    font-size: 14px;
    color: #57534E;
    white-space: nowrap;
    font-weight: 500;
}

.v25-calc-option-price {
    font-size: 19px;
    font-weight: 700;
    color: #1C1917;
    text-align: right;
    white-space: nowrap;
}

.v25-calc-option-price-small {
    font-size: 13px;
    font-weight: 500;
    color: #A8A29E;
}

.v25-calc-empty {
    text-align: center;
    color: #78716C;
    padding: 20px;
    margin: 0;
}

.v25-calc-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #F5F5F4;
    font-size: 12px;
    color: #A8A29E;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.v25-calc-meta strong {
    color: #57534E;
    font-weight: 600;
}

.v25-calc-meta-warn {
    color: #C57B00;
}

/* ===== SEO BLOCK ===== */

.v25-calc-seo {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #E7E5E4;
    color: #57534E;
    font-size: 15px;
    line-height: 1.6;
}

.v25-calc-seo h2 {
    color: #004a4a;
    font-size: 22px;
    margin: 0 0 12px 0;
}

.v25-calc-seo h3 {
    color: #004a4a;
    font-size: 17px;
    margin: 20px 0 8px 0;
}

.v25-calc-seo ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.v25-calc-seo li {
    margin-bottom: 6px;
}

.v25-calc-seo a {
    color: #A65A3C;
    text-decoration: underline;
}

.v25-calc-seo-note {
    color: #78716C;
    font-size: 14px;
    font-style: italic;
    margin-top: 8px;
}

.v25-calc-carrier-bullets li {
    margin-bottom: 10px;
}

/* FAQ — native <details> styled */
.v25-calc-faq details {
    border: 1px solid #E7E5E4;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #ffffff;
    transition: border-color .15s;
}

.v25-calc-faq details[open] {
    border-color: #D6D3D1;
    background: #FAFAF9;
}

.v25-calc-faq summary {
    cursor: pointer;
    padding: 14px 42px 14px 18px;
    font-weight: 500;
    font-size: 15px;
    color: #1C1917;
    list-style: none;
    position: relative;
}

.v25-calc-faq summary::-webkit-details-marker {
    display: none;
}

.v25-calc-faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #A65A3C;
    font-size: 20px;
    font-weight: 400;
    transition: transform .15s;
}

.v25-calc-faq details[open] summary::after {
    content: "−";
}

.v25-calc-faq summary:hover {
    color: #A65A3C;
}

.v25-calc-faq details p {
    padding: 0 18px 16px 18px;
    margin: 0;
    color: #57534E;
    font-size: 14px;
    line-height: 1.6;
}

.v25-calc-cta-block {
    margin-top: 32px;
    padding: 18px 22px;
    background: #FEF7F2;
    border: 1px solid #F3DFD2;
    border-radius: 10px;
    color: #57534E;
    font-size: 15px;
}

.v25-calc-cta-block a {
    color: #A65A3C;
    font-weight: 600;
    text-decoration: none;
}

.v25-calc-cta-block a:hover {
    text-decoration: underline;
}

/* ===== SAVE / SHARE / EXPORT ACTIONS ===== */

.v25-calc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #F5F5F4;
}

.v25-calc-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #D6D3D1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #57534E;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.v25-calc-action:hover:not(:disabled) {
    border-color: #A65A3C;
    color: #A65A3C;
    background: #FEF7F2;
}

.v25-calc-action:disabled {
    opacity: 0.5;
    cursor: wait;
}

.v25-calc-action-primary {
    background: #A65A3C;
    border-color: #A65A3C;
    color: #ffffff;
}

.v25-calc-action-primary:hover:not(:disabled) {
    background: #8A4A32;
    border-color: #8A4A32;
    color: #ffffff;
}

.v25-calc-action svg {
    flex-shrink: 0;
}

.v25-calc-action-hint {
    margin-top: 10px;
    padding: 10px 14px;
    background: #E8F5E9;
    border: 1px solid #C8E6C9;
    border-radius: 6px;
    color: #2E7D32;
    font-size: 13px;
    word-break: break-all;
}

.v25-calc-action-hint.v25-calc-action-hint-err {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #B91C1C;
}

/* ===== EMAIL MODAL ===== */

.v25-calc-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.v25-calc-modal[hidden] { display: none; }

.v25-calc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.5);
    backdrop-filter: blur(2px);
}

.v25-calc-modal-box {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 24px 24px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.v25-calc-modal-box h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1C1917;
}

.v25-calc-modal-lead {
    margin: 0 0 18px 0;
    font-size: 13px;
    color: #78716C;
    line-height: 1.5;
}

.v25-calc-modal-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #57534E;
    margin-bottom: 6px;
    margin-top: 14px;
}

.v25-calc-modal-box input[type="email"],
.v25-calc-modal-box input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid #D6D3D1;
    border-radius: 8px;
    background: #FAFAF9;
    color: #1C1917;
}

.v25-calc-modal-box input:focus {
    outline: none;
    border-color: #A65A3C;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(166,90,60,0.1);
}

.v25-calc-modal-box .v25-calc-submit {
    margin-top: 16px;
}

.v25-calc-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #A8A29E;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.v25-calc-modal-close:hover {
    color: #1C1917;
    background: #F5F5F4;
}

.v25-calc-modal-status {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.v25-calc-modal-status-ok {
    background: #E8F5E9;
    border: 1px solid #C8E6C9;
    color: #2E7D32;
}

.v25-calc-modal-status-err {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
}

@media (max-width: 640px) {
    .v25-calc-actions {
        flex-direction: column;
    }
    .v25-calc-action {
        width: 100%;
        justify-content: center;
    }
}

/* ===== MOBILE ===== */

@media (max-width: 640px) {
    .v25-calc-form {
        padding: 16px;
    }
    .v25-calc-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }
    .v25-calc-row-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 641px) and (max-width: 1000px) {
    .v25-calc-row-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .v25-calc-option {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "left    price"
            "left    eta";
        gap: 4px 12px;
        padding: 12px 14px;
    }
    .v25-calc-option-left {
        grid-area: left;
    }
    .v25-calc-option-eta {
        grid-area: eta;
        text-align: right;
        font-size: 13px;
    }
    .v25-calc-option-price {
        grid-area: price;
        font-size: 17px;
    }
    .v25-calc-option-service {
        font-size: 14px;
    }
    .v25-calc-carrier-tag {
        min-width: 38px;
        height: 28px;
        font-size: 10px;
    }
    .v25-calc-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .v25-calc-tab {
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 13px;
    }
}
