/* DabDash Geolocation Styles */

/* Region Indicator */
.dabdash-region-indicator {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease-out;
}

.dabdash-region-indicator .region-label {
    opacity: 0.9;
}

.dabdash-region-indicator .region-name {
    font-weight: 600;
}

.dabdash-region-indicator .change-region-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.dabdash-region-indicator .change-region-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Region Change Notification */
.dabdash-region-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.dabdash-region-notification.show {
    transform: translateX(0);
}

/* Out of Stock Styling for Region */
.dabdash-out-of-region {
    opacity: 0.6;
    position: relative;
}

.dabdash-out-of-region::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 107, 107, 0.1) 10px,
        rgba(255, 107, 107, 0.1) 20px
    );
    pointer-events: none;
}

/* Product Stock Status */
.stock.region-specific {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    font-size: 13px;
    font-weight: 500;
}

.stock.region-specific.out-of-stock {
    border-left-color: #e74c3c;
    background: #fdf2f2;
    color: #c0392b;
}

.stock.region-specific.low-stock {
    border-left-color: #f39c12;
    background: #fefaf5;
    color: #d68910;
}

/* Add to Cart Button States */
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled {
    background: #bdc3c7 !important;
    color: #7f8c8d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.single_add_to_cart_button.region-unavailable {
    background: #e74c3c !important;
    border-color: #c0392b !important;
    position: relative;
}

.single_add_to_cart_button.region-unavailable:hover {
    background: #c0392b !important;
}

/* Product Loop Items */
.woocommerce ul.products li.product .region-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    z-index: 2;
}

.woocommerce ul.products li.product .region-status.available {
    background: rgba(39, 174, 96, 0.9);
}

.woocommerce ul.products li.product .region-status.unavailable {
    background: rgba(231, 76, 60, 0.9);
}

/* Zone Stock Table (Admin) */
.dabdash-zone-stock-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.dabdash-zone-stock-table th,
.dabdash-zone-stock-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.dabdash-zone-stock-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.dabdash-zone-stock-table .stock-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dabdash-zone-stock-table .status-select {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Zone Settings in Product Edit */
.dabdash-zone-settings {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.dabdash-zone-settings h4 {
    margin: 0 0 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.dabdash-zone-settings .zone-setting {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.dabdash-zone-settings .zone-setting label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.dabdash-zone-settings .zone-stock-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.dabdash-zone-settings .zone-stock-settings label {
    font-size: 13px;
    color: #666;
}

.dabdash-zone-settings select,
.dabdash-zone-settings input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dabdash-region-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .dabdash-region-indicator .change-region-btn {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .dabdash-region-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        font-size: 13px;
    }
    
    .dabdash-region-notification.show {
        transform: translateY(0);
    }
    
    .dabdash-zone-settings .zone-stock-settings {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .dabdash-region-indicator {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        padding: 12px 15px;
    }
    
    .woocommerce ul.products li.product .region-status {
        position: relative;
        top: auto;
        right: auto;
        margin: 8px 0;
        display: inline-block;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* Loading States */
.dabdash-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.dabdash-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #27ae60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Dark Mode Support - DISABLED to prevent conflicts with theme styling */
/* @media (prefers-color-scheme: dark) {
    .dabdash-zone-settings {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .stock.region-specific {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .stock.region-specific.out-of-stock {
        background: #4a2c2a;
        color: #e74c3c;
    }

    .stock.region-specific.low-stock {
        background: #4a3c2a;
        color: #f39c12;
    }
} */