/* Audio Rooms Global Styles */
.audio-rooms-page {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    background-color: var(--bg-body, #1e1e24);
    color: var(--text-color, #e0e0e0);
}

.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    max-width: var(--contentW, 1200px);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .rooms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.room-card {
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
}

.room-card-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
}

.room-card-header h3 {
    margin: 0;
    font-size: var(--font-16, 1rem);
    font-family: var(--fontH, inherit);
    color: var(--text-primary, #0D0C22);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-host-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: var(--fontB, inherit);
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-card-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.room-card-header-icon svg {
    width: 24px;
    height: 24px;
}

.room-card-header-icon:hover {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-primary, #0D0C22);
}

.room-card-spots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* Dynamic Grid Adjustments based on total spot count to perfectly cover full width */
.room-card-spots:has(.room-spot:last-child:nth-child(2)) {
    grid-template-columns: repeat(2, 1fr);
}

.room-card-spots:has(.room-spot:last-child:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

.room-card-spots:has(.room-spot:last-child:nth-child(4)) {
    grid-template-columns: repeat(4, 1fr);
}

.room-card-spots:has(.room-spot:last-child:nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);
}



.room-spot {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 120px;
    max-height: 120px;
    margin: 0 auto;
}

.room-spot.empty {
    border: 1.5px dashed #94a3b8;
    background: transparent;
}

.room-card-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

.room-join-btn {
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-family: var(--fontB, inherit);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    color: #8b5cf6;
    border: 1.5px solid rgba(139, 92, 246, 0.3);
}

.room-join-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

/* Bottom Sheet Form Styles */
.form-group {
    margin-bottom: 22px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #0D0C22);
    font-family: var(--fontH, inherit);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #0D0C22);
    font-size: 15px;
    font-family: var(--fontB, inherit);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    border-color: #8b5cf6;
    background: var(--bg-primary, #ffffff);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #0D0C22);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.full-width {
    width: 100%;
}

/* Submit Create Room Button in Bottom Sheet (widget-btn style) */
#submitCreateRoomBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 13px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--fontB) !important;
    font-size: var(--font-15);
    font-weight: var(--font-weight-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

#submitCreateRoomBtn:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: none;
    opacity: 1;
}

#submitCreateRoomBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: var(--text-primary);
    color: var(--bg-primary);
}

.help-text {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    margin-top: 6px;
    line-height: 1.4;
}

/* Single Room Screen */
.audio-room-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #121212;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.room-top-bar {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.room-top-bar h2 {
    margin: 0;
    color: #fff;
}

.room-host {
    color: #aaa;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.badge.private-badge {
    background: #e74c3c;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.room-canvas {
    flex: 1;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-content: center;
    justify-items: center;
    overflow-y: auto;
}

/* Avatar Circle */
.participant-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 2.5rem;
    color: #fff;
    transition: box-shadow 0.1s;
}

/* Speaking Indicator (Green Glow) */
.participant-avatar.speaking {
    box-shadow: 0 0 0 4px #2ecc71;
}

/* Mute Indicator */
.mute-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #e74c3c;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #121212;
}

.mute-icon svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

.participant-name {
    margin-top: 1rem;
    text-align: center;
    color: #ddd;
    font-size: 1rem;
}

.room-bottom-bar {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background-color 0.2s;
}

.control-btn:hover {
    transform: scale(1.05);
}

.mute-btn {
    background: #333;
    color: #fff;
}

.mute-btn.muted {
    background: #e74c3c;
    color: #fff;
}

.leave-btn {
    background: #e74c3c;
    color: #fff;
}