/* ===================================================
   WooCommerce Dynamic PIN Code Delivery Estimator
   Theme: Anamala Handlooms Luxury Heritage Integration
   =================================================== */

.wc-pincode-estimator-wrap {
    margin: 1.75rem 0 2rem 0;
    width: 100%;
}

.wc-pincode-estimator-card {
    background: #ffffff;
    border: 1px solid #e8e0d6;
    border-radius: 12px;
    padding: 1.35rem 1.45rem;
    box-shadow: 0 4px 16px rgba(30, 61, 47, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    font-family: var(--body-font, 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif);
}

.wc-pincode-estimator-card:hover {
    border-color: #d8cdbe;
    box-shadow: 0 6px 20px rgba(30, 61, 47, 0.07);
}

/* ── Card Header ────────────────────────────────────────── */
.wc-pincode-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.wc-pincode-icon-truck {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(30, 61, 47, 0.08);
    color: #1e3d2f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wc-pincode-header-text {
    display: flex;
    flex-direction: column;
}

.wc-pincode-title {
    font-family: var(--header-font, 'Lora', serif);
    font-size: 1.12rem;
    font-weight: 500;
    color: #1a1a14;
    line-height: 1.3;
}

.wc-pincode-sub {
    font-size: 0.8rem;
    color: #6e6e66;
    margin-top: 0.15rem;
}

/* ── Input Group ────────────────────────────────────────── */
.wc-pincode-input-group {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
}

.wc-pincode-input-inner {
    position: relative;
    flex: 1;
}

.wc-pincode-pin-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8932a;
    font-size: 1.05rem;
    pointer-events: none;
}

.wc-pincode-input {
    width: 100% !important;
    height: 44px !important;
    padding: 0.5rem 1rem 0.5rem 2.45rem !important;
    font-family: var(--body-font, 'Work Sans', sans-serif) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #1a1a14 !important;
    background: #faf7f0 !important;
    border: 1px solid #d9cebf !important;
    border-radius: 8px !important;
    outline: none !important;
    letter-spacing: 1px !important;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.wc-pincode-input:focus {
    border-color: #b8932a !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(184, 147, 42, 0.18) !important;
}

.wc-pincode-btn-check {
    height: 44px;
    padding: 0 1.5rem;
    background: #1e3d2f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--body-font, 'Work Sans', sans-serif);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: 0.4px;
}

.wc-pincode-btn-check:hover:not(:disabled) {
    background: #b8932a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 147, 42, 0.3);
}

.wc-pincode-btn-check:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner inside button */
.wc-pincode-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wc_pin_spin 0.75s linear infinite;
    display: inline-block;
}

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

/* ── Auto Detect Button ─────────────────────────────────── */
.wc-pincode-auto-detect-wrap {
    margin-top: 0.65rem;
    text-align: right;
}

.wc-pincode-auto-detect-btn {
    background: none;
    border: none;
    padding: 0;
    color: #1e3d2f;
    font-family: var(--body-font, 'Work Sans', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wc-pincode-auto-detect-btn i {
    color: #b8932a;
    font-size: 0.95rem;
}

.wc-pincode-auto-detect-btn:hover {
    color: #b8932a;
}

.wc-pincode-auto-detect-btn.is-detecting {
    opacity: 0.75;
    pointer-events: none;
}

.wc-pincode-auto-detect-btn.is-detecting i {
    animation: wc_pin_spin 1s linear infinite;
}

/* ── Message Alert ──────────────────────────────────────── */
.wc-pincode-message {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.wc-pincode-message--error {
    background: #fdf2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.wc-pincode-message--info {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ── Result Section ─────────────────────────────────────── */
.wc-pincode-result-section {
    animation: wc_pin_fadeIn 0.3s ease;
}

@keyframes wc_pin_fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wc-pincode-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed #e5ded2;
    margin-bottom: 1rem;
}

.wc-pincode-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e3d2f;
}

.wc-pincode-location-badge i {
    color: #b8932a;
    font-size: 1rem;
}

.wc-pincode-change-link {
    background: none;
    border: none;
    padding: 0;
    color: #b8932a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.wc-pincode-change-link:hover {
    color: #1e3d2f;
}

/* ── Estimate Banner ────────────────────────────────────── */
.wc-pincode-estimate-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #faf7f0;
    border: 1px solid #ece4d7;
    border-left: 3.5px solid #1e3d2f;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.15rem;
}

.wc-pincode-estimate-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(30, 61, 47, 0.1);
    color: #1e3d2f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.wc-pincode-estimate-details {
    display: flex;
    flex-direction: column;
}

.wc-pincode-date-text {
    font-family: var(--header-font, 'Lora', serif);
    font-size: 1.08rem;
    color: #1a1a14;
    line-height: 1.35;
}

.wc-pincode-date-text strong {
    color: #1e3d2f;
    font-weight: 600;
}

.wc-pincode-dispatch-sub {
    font-size: 0.78rem;
    color: #78736a;
    margin-top: 0.35rem;
}

/* ── Badges Grid ────────────────────────────────────────── */
.wc-pincode-badges-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.wc-pincode-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #4a473f;
    line-height: 1.4;
}

.wc-pincode-badge-item i {
    color: #b8932a;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ── Responsive Mobile ──────────────────────────────────── */
@media (max-width: 576px) {
    .wc-pincode-estimator-card {
        padding: 1.15rem 1.15rem;
    }
    .wc-pincode-btn-check {
        padding: 0 1.15rem;
        font-size: 0.88rem;
    }
    .wc-pincode-date-text {
        font-size: 1rem;
    }
}
