/*
 * TSCardápio - CSS Principal
 * Agregador de Cardápios Digitais
 */

/* ===========================================
   Material Symbols Configuration
   =========================================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ===========================================
   CSS Variables
   =========================================== */
:root {
    --primary: #f48c25;
    --primary-rgb: 244, 140, 37;
    --background-light: #f8f7f5;
    --background-dark: #221910;
    --surface-light: #ffffff;
    --surface-dark: #2c241b;
    --text-main: #181411;
    --text-secondary: #897561;
    --border-light: #e6e0db;
    --border-dark: #40362f;
}

/* Dark mode */
.dark {
    --primary: #f48c25;
    --background-light: #221910;
    --surface-light: #2c241b;
    --text-main: #ffffff;
    --text-secondary: #b9ab9d;
    --border-light: #40362f;
}

/* ===========================================
   Base Styles
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===========================================
   Utility Classes (Tailwind-like)
   =========================================== */
.font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.bg-primary {
    background-color: var(--primary);
}

.text-primary {
    color: var(--primary);
}

.border-primary {
    border-color: var(--primary);
}

.bg-background-light {
    background-color: var(--background-light);
}

.bg-background-dark {
    background-color: var(--background-dark);
}

.text-text-main {
    color: var(--text-main);
}

.text-text-secondary {
    color: var(--text-secondary);
}

/* Safe area for mobile */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===========================================
   Navigation Styles
   =========================================== */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(244, 140, 37, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background-color: rgba(244, 140, 37, 0.15);
    color: var(--primary);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    width: 3.5rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.bottom-nav-link .material-symbols-outlined {
    font-size: 1.25rem;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary);
}

/* ===========================================
   Form Styles
   =========================================== */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 140, 37, 0.15);
}

/* Custom checkbox */
input[type="checkbox"] {
    accent-color: var(--primary);
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

/* ===========================================
   Card Styles
   =========================================== */
.card {
    background: white;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Button Styles
   =========================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(244, 140, 37, 0.25);
}

.btn-primary:hover {
    background-color: rgba(244, 140, 37, 0.9);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ===========================================
   Toggle Switch
   =========================================== */
.toggle-switch {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.toggle-switch.active {
    background-color: var(--primary);
}

.toggle-switch.active::after {
    transform: translateX(1.25rem);
}

/* ===========================================
   Scrollbar
   =========================================== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom scrollbar for desktop */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }
}

/* ===========================================
   Animations
   =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===========================================
   Line Clamp
   =========================================== */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {
    .no-print {
        display: none !important;
    }
}