/* NE FlexiShip Frontend Styles - Compact Design */

.ne-flexiship-checker {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
}

.ne-flexiship-checker h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ne-flexiship-checker h4:before {
    content: "📍";
    font-size: 14px;
}

.pincode-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    align-items: center;
}

#ne-flexiship-pincode-input {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    width: 120px;
    background: #fafbfc;
    font-weight: 500;
    transition: all 0.3s ease;
}

#ne-flexiship-pincode-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

#ne-flexiship-pincode-input::placeholder {
    color: #6c757d;
    font-size: 13px;
}

#ne-flexiship-check-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ne-flexiship-check-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

#ne-flexiship-check-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pincode-result {
    min-height: 20px;
}

.pincode-result .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 12px;
}

.pincode-result .error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.pincode-result .error:before {
    content: "⚠️";
    font-size: 14px;
}

.pincode-result .loading {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.pincode-result .loading:before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pincode-result p {
    margin: 0;
    font-size: 14px;
}

.pincode-result .delivery-message {
    font-weight: 600;
    margin-bottom: 5px !important;
}

.pincode-result .cod-message {
    font-size: 13px;
    opacity: 0.9;
}

/* Checkout form styles */
#ne_flexiship_pincode_field {
    margin: 15px 0;
}

#ne_flexiship_pincode_field label {
    font-weight: 600;
}

/* Compact Modern Delivery Status Display */
.delivery-status-display {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

/* Available case styling */
.delivery-status-display {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

/* Not available styling */
.delivery-status-display.not-available {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    position: relative;
    z-index: 2;
}

/* Status icon */
.delivery-info:before {
    content: "✓";
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.delivery-not-available .delivery-info:before {
    content: "✗";
}

/* Pincode display */
.delivery-available .pincode-display,
.delivery-not-available .pincode-display,
.delivery-info .pincode-display {
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 13px;
    backdrop-filter: blur(10px);
}

/* Delivery message */
.delivery-available .delivery-message,
.delivery-not-available .delivery-message,
.delivery-info .delivery-message {
    color: white;
    font-weight: 500;
    flex: 1;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Change button */
.change-pincode-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.change-pincode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* COD Status */
.cod-status {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.cod-status:before {
    content: "💳";
    font-size: 12px;
}

.cod-message {
    color: white;
    font-size: 12px;
    font-weight: 400;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Background pattern */
.delivery-status-display:after {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    z-index: 1;
}

/* Shop page status bar removed */

/* Simplified Checkout delivery status */
.ne-flexiship-checkout-status {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ne-flexiship-checkout-status.not-available {
    border-color: #f5c6cb;
    background: #fff5f5;
}

.ne-flexiship-checkout-status h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ne-flexiship-checkout-status h3:before {
    content: "🚚";
    font-size: 15px;
}

.ne-flexiship-checkout-status .delivery-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ne-flexiship-checkout-status .delivery-info p {
    margin: 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.ne-flexiship-checkout-status .delivery-available {
    color: #155724;
}

.ne-flexiship-checkout-status .delivery-not-available {
    color: #721c24;
}

.ne-flexiship-checkout-status .cod-available {
    color: #155724;
}

.ne-flexiship-checkout-status .cod-not-available {
    color: #856404;
}

.ne-flexiship-checkout-status .delivery-available:before {
    content: "⏱️";
    font-size: 14px;
}

.ne-flexiship-checkout-status .delivery-not-available:before {
    content: "✗";
    color: #dc3545;
    font-weight: bold;
}

.ne-flexiship-checkout-status .cod-available:before {
    content: "💳";
    font-size: 14px;
}

.ne-flexiship-checkout-status .cod-not-available:before {
    content: "🚫";
    font-size: 14px;
}

.ne-flexiship-checkout-status .delivery-warning {
    color: #856404;
    font-style: italic;
}

.ne-flexiship-checkout-status.no-pincode {
    border-color: #ffeaa7;
    background: #fffbf0;
}

/* Hide hidden inputs */
.ne-flexiship-checkout-status input[type="hidden"] {
    display: none;
}

/* Disabled place order button */
#place_order.disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

#place_order.disabled:hover {
    background: #6c757d !important;
    border-color: #6c757d !important;
}

/* Checkout form styles */
#ne_flexiship_pincode_field {
    margin: 15px 0;
}

#ne_flexiship_pincode_field label {
    font-weight: 600;
}

/* Error messages */
.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .ne-flexiship-checker {
        padding: 10px 12px;
        margin: 12px 0;
    }
    
    .pincode-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    #ne-flexiship-pincode-input {
        width: 100%;
    }
    
    .delivery-info {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .delivery-info .delivery-message {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .ne-flexiship-checker h4 {
        font-size: 13px;
    }
    
    .delivery-info {
        font-size: 12px;
    }
    
    .cod-status {
        font-size: 11px;
    }
}
