/* ===== Channel Creation Modal ===== */

.channel-create-modal {
    max-width: 560px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.channel-create-modal .modal-subtitle {
    font-size: 0.88em;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* --- Form inputs: glass-input for text, textarea, select --- */
.channel-create-modal .glass-input,
.channel-create-modal input[type="text"],
.channel-create-modal textarea,
.channel-create-modal select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f0f0f0;
    font-size: 0.92em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.channel-create-modal .glass-input::placeholder,
.channel-create-modal input::placeholder,
.channel-create-modal textarea::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.channel-create-modal .glass-input:focus,
.channel-create-modal input[type="text"]:focus,
.channel-create-modal textarea:focus,
.channel-create-modal select:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 255, 165, 0), 0.15);
}

/* Textarea */
.channel-create-modal textarea {
    resize: vertical;
    min-height: 56px;
    line-height: 1.5;
}

/* Select dropdown */
.channel-create-modal select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5 8 12l6.5-6.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px;
}

.channel-create-modal select option {
    background: #1a1a2e;
    color: #f0f0f0;
    padding: 8px;
}

/* --- Mode Chips --- */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.interactive-chip {
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 0.84em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.interactive-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.interactive-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(var(--primary-color-rgb, 255, 165, 0), 0.3);
}

/* --- Form row (language + visibility) --- */
.form-row-2 {
    display: flex;
    gap: 16px;
}

.form-row-2 .form-group {
    flex: 1;
}

/* --- Labels --- */
.channel-create-modal label {
    display: block;
    font-weight: 600;
    font-size: 0.88em;
    margin-bottom: 6px;
    color: #e0e0e0;
}

.channel-create-modal .flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- Add Cast button --- */
.btn-text-small {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--primary-color);
    font-size: 0.82em;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-text-small:hover {
    background: rgba(var(--primary-color-rgb, 255, 165, 0), 0.1);
    border-color: var(--primary-color);
}

/* --- Cast List --- */
.channel-cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    min-height: 54px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    align-items: center;
}

.empty-cast-msg {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.84em;
    width: 100%;
    text-align: center;
    font-style: italic;
}

.cast-avatar-item {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.cast-avatar-item:hover {
    transform: translateY(-3px);
    border-color: #ff4757;
}

.cast-avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-avatar-item::after {
    content: "\f00d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 71, 87, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 14px;
}

.cast-avatar-item:hover::after {
    opacity: 1;
}

/* --- Advanced / Director Prompt --- */
.advance-group {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#channelStyleToggleBtn {
    margin-bottom: 0;
}

#channelStyleToggleIcon {
    transition: transform 0.3s ease;
    font-size: 0.8em;
    color: var(--text-secondary);
}

#channelStyleToggleIcon.open {
    transform: rotate(180deg);
}

/* --- Footer buttons --- */
.channel-create-modal .modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.channel-create-modal .modal-footer .btn-secondary,
.channel-create-modal .modal-footer .btn-primary {
    flex: 1;
    padding: 12px;
    border-radius: 24px;
    font-size: 0.92em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.channel-create-modal .modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-create-modal .modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.channel-create-modal .modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #ff8c00);
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--primary-color-rgb, 255, 165, 0), 0.35);
}

.channel-create-modal .modal-footer .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(var(--primary-color-rgb, 255, 165, 0), 0.5);
    transform: translateY(-1px);
}

/* --- Scrollbar --- */
.channel-create-modal::-webkit-scrollbar {
    width: 4px;
}

.channel-create-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
