/**
 * Delhivery Pincode Checker Styles
 * Premium, sleek UI matching WooCommerce & modern eCommerce standards
 */

.delhivery-pincode-widget {
    margin: 22px 0 16px 0;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    box-sizing: border-box;
}

.delhivery-pincode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.delhivery-icon-pin {
    width: 20px;
    height: 20px;
    color: #e11d48;
    flex-shrink: 0;
}

.delhivery-widget-heading {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.2px;
}

/* Input Row */
.delhivery-input-group {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 360px;
}

#delhivery-pincode-input {
    width: 100%;
    height: 44px;
    padding: 0 85px 0 14px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    letter-spacing: 0.5px;
}

#delhivery-pincode-input:focus {
    border-color: #0f172a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

#delhivery-pincode-check-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    padding: 0 16px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 65px;
}

#delhivery-pincode-check-btn:hover {
    background: #1e293b;
}

#delhivery-pincode-check-btn:active {
    transform: translateY(-50%) scale(0.98);
}

#delhivery-pincode-check-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loading Spinner */
.delhivery-pincode-widget .btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: delhivery-spin 0.6s linear infinite;
}

@keyframes delhivery-spin {
    to { transform: rotate(360deg); }
}

/* Results Box */
.delhivery-pincode-result {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    animation: delhivery-fade-in 0.25s ease-out;
}

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

.delhivery-result-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delhivery-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.delhivery-location-badge strong {
    color: #0f172a;
}

.delhivery-change-link {
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 6px;
}

.delhivery-change-link:hover {
    color: #1d4ed8;
}

.delhivery-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #1e293b;
}

.delhivery-row-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.delhivery-row-icon.delivery {
    color: #059669;
}

.delhivery-row-icon.cod-yes {
    color: #059669;
}

.delhivery-row-icon.cod-no {
    color: #d97706;
}

.delhivery-row-icon.shipping {
    color: #2563eb;
}

.delhivery-delivery-date {
    font-weight: 600;
    color: #059669;
}

.delhivery-badge-cod {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.delhivery-badge-cod.available {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.delhivery-badge-cod.unavailable {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.delhivery-badge-free {
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    font-size: 12px;
    background: #ecfdf5;
    padding: 2px 7px;
    border-radius: 4px;
}

/* Error state */
.delhivery-error-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 13px;
    color: #991b1b;
}

.delhivery-error-icon {
    width: 18px;
    height: 18px;
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 1px;
}
