/* =========================================================
   FONTS
   ========================================================= */

/**
 * Imports primary UI font used across the application.
 */
@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&display=swap');

/**
 * Imports decorative heading font for titles and headers.
 */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/**
 * Imports high-quality Cyrillic display font for restaurant titles.
 */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@900&display=swap');


/* =========================================================
   GLOBAL RESET & BASE LAYOUT
   ========================================================= */

/**
 * Applies consistent box model across all elements.
 * Ensures padding and border are included in element width/height.
 */
* {
    box-sizing: border-box;
}

/**
 * Base document styling.
 * Sets default font, colors, spacing, and background.
 */
body {
    margin: 0;
    padding: 0;

    font-family: 'Didact Gothic', sans-serif;
    color: #333;

    background-color: #fff;
}

/**
 * Disables page scrolling when modal dialogs are open.
 * Also improves touch behavior on mobile devices.
 */
body.no-scroll {
    overflow: hidden;
    touch-action: none;
}


/* =========================================================
   TYPOGRAPHY — HEADINGS & TEXT
   ========================================================= */

/**
 * Primary page heading style.
 * Uses decorative font for strong visual hierarchy.
 */
h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 40px;
    line-height: 1.2;
    margin: 10px 0;
}

h1.restaurant-title--cyrillic {
    font-family: 'Onest', sans-serif;
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.02em;
}

/**
 * Base paragraph styling.
 * Defines default readable text size and spacing.
 */
p {
    font-size: 16px;
    margin: 5px 0;
}


/* =========================================================
   TYPOGRAPHY — RESPONSIVE ADJUSTMENTS
   ========================================================= */

/**
 * Reduces heading size on tablets and small screens.
 */
@media (max-width: 768px) {
    h1 {
        font-size: 35px;
    }
}

/**
 * Ensures headings remain readable on very small devices.
 */
@media (max-width: 480px) {
    h1 {
        font-size: 35px;
    }
}


/* =========================================================
   COMPONENT — LOGOUT BUTTON (ADMIN UI)
   ========================================================= */

/**
 * Container positioning for logout button on admin pages.
 * Places button in the top-right corner above other content.
 */
.logout-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 999;
}

/**
 * Styles the logout action button.
 * Designed as a prominent destructive action control.
 */
.logout-button {
    padding: 10px 15px;
    font-size: 14px;

    background-color: #ff4d4d;
    color: #fff;

    border: none;
    border-radius: 5px;
    cursor: pointer;

    transition: background-color 0.2s ease;
}

/**
 * Hover state for logout button.
 * Provides visual feedback on interaction.
 */
.logout-button:hover {
    background-color: #ff1a1a;
}


/* =========================================================
   COMPONENT — SCROLL TO TOP BUTTON
   ========================================================= */

/**
 * Floating button that scrolls the page back to the top.
 * Hidden by default and typically shown via JavaScript.
 */
.scroll-to-top-btn {
    position: fixed;
    bottom: 15px;
    left: 15px;

    width: 50px;
    height: 50px;

    display: none;
    align-items: center;
    justify-content: center;

    background-color: lightgray;
    border: none;
    border-radius: 50%;

    cursor: pointer;
    z-index: 999;

    transition: background-color 0.2s ease;

    -webkit-tap-highlight-color: transparent; /* 🔥 */
}

/** * Icon inside the scroll-to-top button. */
.scroll-to-top-btn i {
    font-size: 24px;
    color: #fff;
}

.scroll-to-top-btn:focus {
    outline: none;
    background-color: lightgray;
}

.scroll-to-top-btn:active {
    background-color: gray;
}

@media (hover: hover) {
    .scroll-to-top-btn:hover {
        background-color: gray;
    }
}
