/* 
 * RMT-Tech RTC Styles (Mobile First Refactor)
 * Default styles = Mobile View
 */

.rtc-container {
    position: relative;
    width: 100%;
    padding: 0 1rem;
    /* Mobile padding */
    margin: 0 auto 1.5rem auto;
    display: flex;
    flex-direction: column;
}

.rtc-main-row {
    display: flex;
    flex-direction: column;
    /* Stack vertically by default */
    gap: 0.75rem;
    width: 100%;
    transition: all 0.25s;
}

.rtc-main-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s;
}

/* Remote video area - Mobile optimized height */
.rtc-remote {
    position: relative;
    background: #000;
    min-height: 200px;
    /* Smaller default for mobile */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rtc-remote video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Local PiP - Mobile optimized size */
.rtc-local {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 30%;
    /* Larger percentage for small screens */
    max-width: 120px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    background: #222;
    border: 2px solid #fff;
}

.rtc-local video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Toolbar - Mobile optimized (wrap if needed, bigger touch targets) */
.rtc-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    /* Darker for contrast */
    border-radius: 8px;
    margin-bottom: 0.5rem;
    width: 100%;
}

.rtc-toolbar button {
    min-width: 44px;
    /* Minimum touch target size */
    min-height: 44px;
    font-size: 1.2em;
}

/* Panels (Status, ICE, Chat) */
.rtc-panel-pre {
    height: 60px;
    /* Smaller for mobile */
    overflow: auto;
    font-family: var(--rmt-font-mono);
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(0, 0, 0, 0.2);
    color: var(--rmt-text-secondary);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.rtc-chat-panel.hide,
.rtc-debug-panel.hide {
    display: none !important;
}

/* --- Tablet/Desktop Enhancements (min-width) --- */

@media (min-width: 768px) {
    .rtc-main-row {
        flex-direction: row;
        /* Switch to side-by-side */
        align-items: stretch;
        gap: 1.5rem;
    }

    .rtc-main-col {
        flex: 1 1 0;
        /* Take available width */
    }

    .rtc-remote {
        min-height: 360px;
        /* Taller for desktop */
    }

    .rtc-local {
        width: 24%;
        max-width: 200px;
        right: 1.5rem;
        bottom: 1.5rem;
    }

    .rtc-toolbar {
        justify-content: flex-start;
        /* Align left on desktop */
        padding: 0.5rem;
    }

    .rtc-panel-pre {
        height: 120px;
        /* Taller logs on desktop */
    }
}

@media (min-width: 1200px) {
    .rtc-container {
        max-width: 1200px;
        padding: 0;
        /* Remove mobile padding when centered */
    }
}