/* ==========================================================================
   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
   ========================================================================== */

.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;
}

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

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

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

.spaced-help-button {
    margin-top: 15px;
}

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

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

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

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

.help-image {
    max-width: 150px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
}

.desktop-image {
    display: block;
}

.help-text {
    display: none;
}

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

/* ==========================================================================
   6. Media Queries (Mobile View)
   ========================================================================== */

@media screen and (max-width: 768px) {
    #permanent-overlay {
        width: 95%;
        bottom: 5px;
        padding: 5px;
        border-radius: 10px;
        justify-content: space-around;
    }

    .overlay-section {
        padding: 0 5px;
        border-right: none; /* Removes the divider lines to save space */
    }

    .overlay-section p {
        font-size: 12px;
        margin-bottom: 5px;
    }

    /* Hides the camera movement title and buttons entirely */
    .camera-title,
    .movement-grid {
        display: none;
    }

    .spaced-help-button {
        margin-top: 0;
        font-size: 14px;
        padding: 5px 10px;
    }

    .action-button {
        min-height: auto;
        padding: 5px 10px;
        gap: 2px;
        font-size: 14px;
    }

    .nav-button {
        font-size: 14px;
        padding: 5px 8px;
        margin: 0 2px;
    }

    .help-image {
        max-width: 50px;
    }

    #help-popup {
        width: 90%;
        padding: 15px;
        max-height: 80vh;
        overflow-y: auto; /* Ensures content scrolls if it is too tall */
    }
}

.action-button svg {
    display: inline-block;
    vertical-align: middle;
}
#action-buttons.hide {
    display: none;
}
/* Styling for the white info box at the bottom */
.f-carousel__caption {
    /* background: rgba(255, 255, 255, 0.95) !important; */
    max-height: 40%;
    overflow-y: auto;
    /* border-top: 1px solid #ddd; */
}

#info-toggle-link {
    color: #eee;
    font-size: 0.8rem;
    text-decoration: underline;
    font-weight: bold;
    width: 100%;
    display: inline-block;
    /* text-align: left; */
    margin-top: 10px;
}

.custom-caption h3 {
    font-size: 1.2rem;
    /* text-align: left; */
    /* color: #000; */
}

/* #full-description {
    font-size: 0.95rem;
    color: #444;
} */