/* Kiosk Fixed Layout - Android TV Optimized (962px x 480-550px) */
/* Base font size reduced for small screen */
html {
    font-size: 12px; /* Reduced from 16px */
    overflow: hidden;
}

body {
    font-size: 12px;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0 !important;
    padding: 0 !important;
}

/* Advertisement sections - Fixed positioning */
#left-ad {
    position: fixed !important;
    width: 100px !important;
    left: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    z-index: 10 !important;
}

#right-ad {
    position: fixed !important;
    width: 200px !important;
    right: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    z-index: 10 !important;
}

/* Position content between advertisements */
#landing-page {
    position: absolute !important;
    left: 100px !important;
    right: 200px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    z-index: 1 !important;
    overflow-y: auto !important;
}

#main-ui {
    position: absolute !important;
    left: 100px !important;
    right: 200px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    z-index: 1 !important;
    overflow-y: auto !important;
}

/* Ensure proper visibility */
#main-ui.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Landing Page Optimizations */
#landing-page {
    padding: 16px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#landing-page header {
    margin-bottom: 12px;
}

#landing-page header h1 {
    font-size: 20px;
    line-height: 1.2;
}

#landing-page header p {
    font-size: 8px;
    margin-top: 2px;
}

#landing-page header img {
    width: 36px;
    height: 36px;
}

/* Header buttons */
#landing-page header a,
#landing-page header button {
    padding: 6px 16px;
    font-size: 11px;
}

/* Main content area */
#landing-page main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
    max-height: 320px;
    margin: 12px 0;
}

#landing-page main h2 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 8px;
}

#landing-page main p {
    font-size: 11px;
    line-height: 1.4;
}

/* Weather/Price cards */
.glass-card {
    padding: 10px;
}

.glass-card .text-2xl {
    font-size: 16px;
}

.glass-card .text-4xl {
    font-size: 20px;
}

.glass-card p {
    font-size: 10px;
}

/* Mic container on landing */
#landing-mic-container {
    width: 80px;
    height: 80px;
}

#landing-mic-icon {
    width: 80px;
    height: 80px;
}

#landing-mic-container svg {
    width: 36px;
    height: 36px;
}

#landing-mic-status {
    font-size: 14px;
    margin-top: 16px;
}

/* Leaf animations */
.leaf-float {
    font-size: 24px;
}

/* Footer cards */
#landing-page footer {
    padding-bottom: 8px;
}

#landing-page footer .glass-card {
    padding: 12px;
}

#landing-page footer h4 {
    font-size: 12px;
}

#landing-page footer p {
    font-size: 9px;
}

#landing-page footer .text-2xl,
#landing-page footer .text-3xl {
    font-size: 18px;
}

/* Footer text */
#landing-page footer > div:last-child {
    margin-top: 12px;
    font-size: 8px;
}

/* Main UI (Voice Bot) */
#main-ui {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#main-ui header {
    padding: 12px 20px;
}

#main-ui header h1 {
    font-size: 20px;
}

#main-ui header p {
    font-size: 8px;
}

#main-ui header img {
    width: 36px;
    height: 36px;
}

/* Desktop layout container */
.desktop-layout {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Sidebar */
.desktop-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    margin: 12px 0 12px 12px;
    border-radius: 12px;
}

.desktop-sidebar-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

/* Status bar */
.glass-card {
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    margin-right: 8px;
}

#status-text {
    font-size: 11px;
}

/* User info card */
#user-info {
    padding: 16px;
    margin-bottom: 16px;
}

#user-info h3 {
    font-size: 13px;
    margin-bottom: 12px;
}

#user-info p {
    font-size: 11px;
}

/* Action instruction */
#action-instruction {
    font-size: 12px;
    margin-bottom: 16px;
}

/* Voice animation */
#voice-animation {
    margin-bottom: 16px;
}

#voice-animation .wave-animation {
    width: 10px;
    height: 40px;
}

#voice-animation p {
    font-size: 11px;
    margin-top: 12px;
}

/* Error message */
#error-message {
    padding: 12px;
    margin-bottom: 16px;
}

#error-text {
    font-size: 11px;
}

/* Keyboard shortcuts */
#keyboard-shortcuts-desktop {
    padding: 8px 12px;
    font-size: 9px;
}

#keyboard-shortcuts-desktop kbd {
    padding: 2px 6px;
    font-size: 8px;
}

/* Main action button */
.main-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 24px;
    margin: 16px auto;
}

/* Desktop main content area */
.desktop-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Conversation container */
.desktop-conversation {
    flex: 1;
    overflow-y: auto;
    width: 100%;
}

#conversation-container {
    height: 100%;
    width: 100%;
}

#conversation-container .glass-card {
    margin: 12px;
    padding: 12px 16px;
    height: calc(100% - 24px);
    width: calc(100% - 24px);
    display: flex;
    flex-direction: column;
}

#conversation-container h3 {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Conversation history */
#conversation-history {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    width: 100%;
}

/* Conversation bubbles */
.message-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.4;
    max-width: 90%;
    margin-bottom: 12px;
}

.user-message {
    margin-left: auto;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.bot-message {
    background: #f3f4f6;
    color: #1f2937;
}

/* Empty state */
#conversation-empty-state {
    padding: 32px 0;
}

#conversation-empty-state .text-6xl {
    font-size: 32px;
    margin-bottom: 12px;
}

#conversation-empty-state h4 {
    font-size: 13px;
    margin-bottom: 8px;
}

#conversation-empty-state p {
    font-size: 10px;
}

/* Exit button */
#desktop-exit-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Loading spinner */
#loading-spinner .glass-card {
    padding: 20px;
}

#loading-spinner .animate-spin {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
}

#loading-spinner p {
    font-size: 12px;
}

/* Advertisement areas */
#left-ad,
#right-ad {
    width: 120px;
}

#left-ad .scroll-text {
    font-size: 10px;
}

#right-ad h4 {
    font-size: 11px;
}

#right-ad h5 {
    font-size: 13px;
}

#right-ad p {
    font-size: 9px;
}

#right-ad button {
    font-size: 9px;
    padding: 6px 12px;
}

#right-ad img {
    width: 60px;
    height: 60px;
}

/* Account dropdown */
#account-btn {
    padding: 6px 16px;
    font-size: 11px;
}

#account-btn i {
    font-size: 14px;
}

#dropdown-menu {
    width: 200px;
    font-size: 10px;
}

#dropdown-menu p {
    font-size: 10px;
}

#dropdown-menu button {
    padding: 10px 12px;
    font-size: 10px;
}

/* Login popup */
#login-popup .glass-card {
    padding: 20px;
    max-width: 320px;
}

#login-popup h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

#login-popup p {
    font-size: 11px;
    margin-bottom: 16px;
}

#login-popup button {
    padding: 8px 16px;
    font-size: 11px;
}

#login-popup i {
    font-size: 24px;
    margin-bottom: 12px;
}

/* Hide all mobile-specific elements */
.mobile-layout,
#center-button-container,
#bottom-button-container,
#exit-container,
#mobile-conversation-btn,
#keyboard-shortcuts-mobile,
#bottom-action-btn,
#main-action-btn {
    display: none !important;
}

/* Ensure desktop elements are visible */
.desktop-layout,
.desktop-sidebar,
.desktop-main,
.desktop-conversation,
#desktop-exit-btn,
#desktop-main-action-btn,
#keyboard-shortcuts-desktop {
    display: flex !important;
}

/* Scrollbar styling for small screen */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Responsive adjustments for exact dimensions */
@media (max-width: 962px) {
    html {
        font-size: 11px;
    }
}

@media (max-height: 500px) {
    #landing-page main {
        max-height: 280px;
    }
    
    .desktop-sidebar {
        width: 280px;
    }
}
