/* ============================================
   Olive Store - Base Styles
   ============================================ */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.fill {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f1;
    border-top: 3px solid #6e8137;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f3f1 25%, #e5e7eb 50%, #f3f3f1 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Slide Up Animation */
.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 9999;
    animation: toastIn 0.3s ease-out;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-warning {
    background-color: #f59e0b;
    color: white;
}

@keyframes toastIn {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

/* Form Validation States */
.input-error {
    border-color: #ef4444 !important;
}

.input-success {
    border-color: #10b981 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background-color: #e5e7eb;
    transition: background-color 0.3s;
}

.password-strength-bar.weak { background-color: #ef4444; }
.password-strength-bar.fair { background-color: #f59e0b; }
.password-strength-bar.good { background-color: #10b981; }
.password-strength-bar.strong { background-color: #059669; }

/* Cart Badge Animation */
.cart-badge {
    transition: transform 0.2s;
}

.cart-badge.bump {
    animation: bump 0.3s ease-out;
}

@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

/* Image Gallery */
.gallery-thumbnail {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
}

/* Quantity Input */
.quantity-input {
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price Formatting */
.price-currency {
    font-size: 0.75em;
    font-weight: normal;
    opacity: 0.8;
}

/* Stock Status */
.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-dot.in-stock { background-color: #10b981; }
.stock-dot.low-stock { background-color: #f59e0b; }
.stock-dot.out-of-stock { background-color: #ef4444; }

/* Responsive Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Admin Sidebar */
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.admin-nav-item:hover {
    background-color: rgba(110, 129, 55, 0.1);
}

.admin-nav-item.active {
    background-color: rgba(110, 129, 55, 0.15);
    color: #6e8137;
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.status-processing {
    background-color: #dbeafe;
    color: #2563eb;
}

.status-shipped {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.status-delivered {
    background-color: #d1fae5;
    color: #059669;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid #6e8137;
    outline-offset: 2px;
}

/* RTL Adjustments */
[dir="rtl"] .rotate-rtl {
    transform: rotate(180deg);
}
