/* ==========================================================================
   1. Global Variables
   ========================================================================== */

:root {
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-popup: rgba(0, 0, 0, 0.9);
    --bg-btn: rgba(255, 255, 255, 0.2);
    --bg-btn-hover: rgba(255, 255, 255, 0.4);

    --text-light: white;
    --text-liked: red;

    --border-light: 1px solid rgba(255, 255, 255, 0.3);
    --border-btn: 1px solid rgba(255, 255, 255, 0.5);

    --radius-container: 15px;
    --radius-btn: 5px;
}

/* ==========================================================================
   2. Main Layout Components
   ========================================================================== */

#permanent-overlay {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    background-color: var(--bg-overlay);
    border: var(--border-light);
    border-radius: var(--radius-container);
    color: var(--text-light);
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 20;
}

#help-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    background-color: var(--bg-popup);
    border: var(--border-light);
    border-radius: var(--radius-container);
    color: var(--text-light);
    padding: 30px;
    text-align: center;
    z-index: 30;
}

/* ==========================================================================
   3. Component Sections & Containers
   ========================================================================== */

.overlay-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    border-right: var(--border-light);
    text-align: center;
}

.overlay-section:last-child {
    border-right: none;
}

.overlay-section p {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.nav-buttons,
.action-buttons,
.language-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-buttons,
.language-buttons {
    gap: 10px;
}

.action-buttons {
    margin-top: 10px;
}

.language-buttons {
    margin-bottom: 20px;
}

.help-content {
    margin: 20px 0;
    line-height: 1.6;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

/* Shared styles for all standard buttons */
.nav-button,
.help-button,
.lang-button,
.close-button,
.action-button {
    background-color: var(--bg-btn);
    border: var(--border-btn);
    border-radius: var(--radius-btn);
    color: var(--text-light);
    cursor: pointer;
    text-align: center;
}

/* Shared hover/active state */
.nav-button:hover,
.help-button:hover,
.close-button:hover,
.action-button:hover,
.lang-button.active {
    background-color: var(--bg-btn-hover);
}

/* Individual button tweaks */
.nav-button {
    padding: 5px 10px;
    margin: 0 5px;
    font-size: 18px;
}

.help-button,
.lang-button,
.action-button {
    padding: 8px 15px;
}

.close-button {
    padding: 8px 20px;
    margin-top: 20px;
}

/* Special button styles (icon-style) */
.like-button {
    color: var(--text-light);
}

.like-button.liked {
    color: var(--text-liked);
}

/* ==========================================================================
   5. Content Toggling
   ========================================================================== */

.help-image {
    max-width: 150px; /* Adjust as needed */
    height: auto;
    display: inline-block; /* Change to inline-block to allow images to sit next to text */
    vertical-align: middle;
    margin: 0 5px; /* Adjust margin for better spacing */
}

.desktop-image {
    display: block;
}


.help-text {
    display: none;
}

.help-text.active {
    display: block;
}

/* ==========================================================================
   6. Media Queries (Mobile First approach would be better, but preserving structure)
   ========================================================================== */

@media screen and (max-width: 600px) {
    #permanent-overlay {
        width: 100%;
        bottom: 10px;
        padding: 8px;
        border-radius: 0;
    }

    .overlay-section {
        padding: 0 4px;
    }

    .overlay-section p {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .action-button {
        min-height: 60px;
        gap: 4px;
    }

    .nav-button,
    .help-button,
    .action-button {
        font-size: 16px;
    }

    .help-image {
        max-width: 50px; /* Adjust as needed */
    }

    #help-popup {
        width: 90%;
        padding: 20px;
        max-height: 80vh;
    }
}