/* ============================================================
   Welcome Mascot - Responsive Styles
   Tablet, mobile, small screen adaptations
   ============================================================ */

/* ─── Tablet (768px and below) ─── */
@media (max-width: 768px) {
    .mascot-container {
        width: 100vw;
        height: auto;
        min-height: 500px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Mascot at the top */
    .mascot-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 50%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto 30px;
    }

    /* Speech bubble below mascot */
    .speech-bubble {
        position: relative;
        left: auto;
        bottom: auto;
        top: auto;
        transform: none;
        margin: 0 auto 20px;
        max-width: 90%;
    }

    .speech-bubble.visible {
        transform: none;
    }

    .speech-bubble[data-position="above"],
    .speech-bubble[data-position="below"] {
        top: auto;
        bottom: auto;
        transform: none;
    }

    .speech-bubble[data-position="above"].visible,
    .speech-bubble[data-position="below"].visible {
        transform: none;
    }

    /* Stack buttons in 2 columns */
    .octagon-button {
        position: static !important;
        transform: none !important;
        margin: 8px;
        width: calc(50% - 16px);
        min-width: auto;
    }

    .octagon-button:hover,
    .octagon-button:focus-visible {
        transform: scale(1.05) !important;
    }

    .octagon-button:active {
        transform: scale(0.98) !important;
    }

    .buttons-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 400px;
        gap: 0;
    }

    /* Remove staggered entrance on mobile */
    .octagon-button {
        animation-delay: 0s !important;
    }

    @keyframes mascot-button-enter {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* ─── Small Mobile (480px and below) ─── */
@media (max-width: 480px) {
    .mascot-container {
        padding: 15px 10px;
        min-height: auto;
    }

    .mascot-center {
        width: 40%;
        max-width: 150px;
        margin-bottom: 20px;
    }

    /* Single column on very small screens */
    .octagon-button {
        width: calc(100% - 16px);
        padding: 12px 16px;
        font-size: 13px;
    }

    .speech-bubble {
        font-size: 14px;
        padding: 12px 16px;
        max-width: 95%;
    }

    /* Smaller audio toggle */
    .mascot-audio-toggle {
        width: 30px;
        height: 30px;
        font-size: 14px;
        bottom: 5px;
        right: 5px;
    }
}

/* ─── Large Screens (1200px+) ─── */
@media (min-width: 1200px) {
    :root {
        --mascot-container-size: 650px;
    }

    .octagon-button {
        min-width: 120px;
        padding: 12px 24px;
        font-size: 15px;
    }

    .speech-bubble {
        max-width: 380px;
        font-size: 16px;
    }
}

/* ─── Very Large Screens (1600px+) ─── */
@media (min-width: 1600px) {
    :root {
        --mascot-container-size: 700px;
    }
}

/* ─── Landscape mobile ─── */
@media (max-height: 500px) and (orientation: landscape) {
    .mascot-container {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        min-height: auto;
        padding: 10px;
    }

    .mascot-center {
        width: 25%;
        max-width: 120px;
        margin: 0 20px 0 0;
    }

    .buttons-container {
        flex: 1;
        max-width: none;
    }

    .octagon-button {
        width: calc(33.33% - 12px);
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ─── Touch Device Detection ─── */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .octagon-button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch */
    .octagon-button:hover {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 4px 15px var(--mascot-shadow);
    }
}

/* ─── Print ─── */
@media print {
    .mascot-container {
        display: none;
    }
}
