/* Custom CSS for RestOS */

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

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

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

.toast-info {
    background-color: #3b82f6;
}

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

/* Order status badges */
.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

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

.status-paid {
    background-color: #dcfce7;
    color: #166534;
}

.status-preparing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-ready {
    background-color: #e0e7ff;
    color: #4338ca;
}

.status-dispatched,
.status-delivering {
    background-color: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background-color: #dcfce7;
    color: #166534;
}

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

/* Pulse animation for new orders (kitchen display) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile-first responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Install button animation */
#install-app {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- White-Label Custom Patterns --- */

/* Maiolica Tile Texture Accent */
.pattern-maiolica {
    /* If the specific image doesn't exist yet, we use a CSS fallback pattern 
       or wait for the user to upload maiolica-pattern.png */
    background-image: url('/static/images/maiolica-pattern.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    mix-blend-mode: luminosity; /* Blends better with dark backgrounds */
}

/* Useful for injecting the pattern as an overlay on cards */
.relative-pattern {
    position: relative;
    overflow: hidden;
}

.relative-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/images/maiolica-pattern.png');
    background-size: cover;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none; /* Allows clicking through */
}

/* Fix Read-Only & Disabled Inputs readability in Dark Mode */
input:disabled,
input[readonly],
textarea:disabled,
textarea[readonly],
select:disabled {
    background-color: #171717 !important; /* brand-surface */
    color: #f3f4f6 !important; /* brand-text */
    opacity: 0.8 !important; /* Forces browsers not to dim too much */
    cursor: not-allowed;
    border-color: #374151 !important; /* Gray-700 to separate from black bg */
}
