/* AI Arena mode: panels, divider, arena chat messages and settings.
 * Extracted from styles.css lines 3456-3742.
 */

/* ============================================
   AI ARENA MODE STYLES
   ============================================ */

/* Arena Container */
.arena-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Arena Panels Grid */
.arena-panels {
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Individual Arena Panel */
.arena-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-main);
    min-width: 0; /* Allow shrinking below content width */
}

/* Arena Panel Header */
.arena-panel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-bottom: none;
    background-color: transparent;
    min-height: 52px;
    position: relative;
}

.arena-panel-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
}

.arena-panel-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arena-model-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 24px 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    max-width: 160px;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 14px;
}

.arena-model-select:hover {
    background-color: var(--bg-hover);
}

.arena-model-select:focus {
    background-color: var(--bg-hover);
    box-shadow: none;
}

/* Generating Indicator */
.arena-generating-indicator {
    font-size: 20px;
    color: var(--blue-accent);
    animation: blink 1s infinite;
    position: absolute;
    right: 20px;
}

.chat-generating-indicator {
    font-size: 16px;
    color: var(--blue-accent);
    animation: blink 1s infinite;
    margin-left: 12px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Arena Divider */
.arena-divider {
    background-color: var(--border-color);
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s ease;
}

.arena-divider:hover {
    background-color: var(--blue-accent);
}

body.resizing-arena {
    cursor: col-resize;
    user-select: none;
}

body.resizing-arena * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Arena Chat Messages */
.arena-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling of the container */
    padding: 20px;
    min-width: 0; /* Allow shrinking below content width */
}

/* Arena Input Containers */
.arena-input-container {
    padding: 4px 24px 24px 24px;
    background-color: transparent;
    flex-shrink: 0;
}

.arena-chat-messages .welcome-screen h2 {
    font-size: 24px;
    font-weight: 500;
}

/* Arena Settings Styles */
.arena-settings {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

#arenaSettings {
    margin-right: -24px;
    padding-right: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.75) transparent;
}

#arenaSettings::-webkit-scrollbar {
    width: 7px;
}

#arenaSettings::-webkit-scrollbar-track {
    background: transparent;
}

#arenaSettings::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

#arenaSettings::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.95);
}

.arena-settings-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.6) transparent;
}

.arena-settings-container::-webkit-scrollbar {
    width: 6px;
}

.arena-settings-container::-webkit-scrollbar-track {
    background: transparent;
}

.arena-settings-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.arena-settings-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.85);
}

.arena-settings-section {
    padding: 0 0 24px 0;
    border-bottom: none;
    margin-top: 24px;
}

.arena-settings-section:first-child {
    margin-top: 32px;
}

.arena-settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.arena-settings-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.arena-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px !important;
    margin-top: 16px !important;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.arena-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.arena-card .setting-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Responsive adjustments for Arena */
@media (max-width: 1200px) {
    .arena-panels {
        grid-template-columns: 1fr 3px 1fr;
    }
    
    .arena-panel-header {
        padding: 10px 16px;
    }
    
    .arena-model-select {
        min-width: 150px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .arena-panels {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 3px 1fr;
    }
    
    .arena-divider {
        cursor: row-resize;
    }
}

