/* Mobile Remote — Presenter Control Panel */

html, body {
    height: 100%;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--color-bg);
}

/* Header */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    z-index: 10;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

/* Presentation Info */
.presentation-info {
    margin: 12px 16px 0;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.presentation-info.hidden {
    display: none;
}

.pres-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 12px;
}

.pres-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.slide-counter {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 15px;
}

/* No Presentation State */
#no-presentation {
    margin: 16px;
    flex: 1;
}

#no-presentation.hidden {
    display: none;
}

/* Slide Preview */
.slide-preview {
    margin: 12px 16px;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    background: #1e293b;
}

.slide-preview.hidden {
    display: none;
}

#preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    flex-shrink: 0;
}

.nav-controls.hidden {
    display: none;
}

.btn-nav {
    flex: 1;
    height: 64px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-nav:active {
    transform: scale(0.95);
}

.nav-icon {
    font-size: 20px;
}

/* Thumbnail Strip */
.thumbnail-strip {
    flex-shrink: 0;
    padding: 12px 0;
    margin: 12px 0 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.thumbnail-strip.hidden {
    display: none;
}

.thumb-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.thumb-scroll::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    flex-shrink: 0;
    width: 80px;
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.thumb-item:active {
    transform: scale(0.93);
}

.thumb-item.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.thumb-item img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.thumb-num {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Bottom Actions */
.bottom-actions {
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    flex-shrink: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.btn-switch {
    width: 100%;
    font-size: 16px;
}

/* Presentation List in Modal */
.modal-presentations {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.presentation-list {
    flex: 1;
    overflow-y: auto;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pres-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 1.5px solid transparent;
}

.pres-list-item:hover,
.pres-list-item:active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary-light);
}

.pres-list-item.current {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.pres-list-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.pres-list-info {
    flex: 1;
    min-width: 0;
}

.pres-list-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pres-list-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Disable text selection globally on remote */
* {
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
