/**
 * Silvra Shiprocket Frontend Styles
 * Add these styles to your main CSS file or include separately
 */

/* Shipping Details Display */
.shipping-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.shipping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.shipping-row:last-of-type {
    border-bottom: none;
}

.shipping-row.free-shipping {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px dashed #667eea;
}

.shipping-row.total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #333;
    font-size: 18px;
}

.shipping-amount {
    font-weight: 600;
    color: #667eea;
}

.delivery-estimate {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.delivery-estimate small {
    color: #999;
    font-size: 12px;
}

/* Shipping Loader */
.shipping-loader,
.delivery-loader {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Shipping Error */
.shipping-error,
.delivery-error {
    background: #ffe0e0;
    color: #d32f2f;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Pincode Status */
.pincode-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.pincode-status.success {
    background: #d4edda;
    color: #155724;
}

.pincode-status.error {
    background: #f8d7da;
    color: #721c24;
}

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

/* Product Page Delivery Widget */
.delivery-info-content {
    margin-top: 15px;
}

.delivery-available,
.delivery-unavailable {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    animation: fadeIn 0.4s ease;
}

.delivery-available {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.delivery-unavailable {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.delivery-icon {
    font-size: 32px;
}

.delivery-details {
    flex: 1;
}

.delivery-details strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.delivery-details p {
    color: #666;
    margin: 0;
}

.free-shipping-badge,
.cod-badge {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    padding: 4px 12px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.free-shipping-badge {
    color: #667eea;
}

.cod-badge {
    color: #28a745;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Checkout Pincode Input Enhancement */
.pincode-input-wrapper {
    position: relative;
}

.pincode-input-wrapper input[type="text"] {
    padding-right: 100px;
}

.pincode-check-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.pincode-check-btn:hover {
    background: #5568d3;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .shipping-row {
        font-size: 14px;
    }

    .shipping-row.total {
        font-size: 16px;
    }

    .delivery-available,
    .delivery-unavailable {
        flex-direction: column;
        text-align: center;
    }

    .delivery-icon {
        font-size: 40px;
    }
}

/* Product Page Delivery Check Widget */
.product-delivery-check {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-delivery-check h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.delivery-input-group {
    display: flex;
    gap: 10px;
}

.delivery-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
}

.delivery-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.delivery-input-group button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.delivery-input-group button:hover {
    background: #5568d3;
}

/* Admin Table Styles (if needed) */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table-wrapper thead {
    background: #f8f9fa;
}

.table-wrapper th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.table-wrapper td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.table-wrapper tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: #cfe2ff;
    color: #084298;
}

.badge-secondary {
    background: #e2e3e5;
    color: #41464b;
}
