/**
 * 방송 등록 모달 스타일
 * 
 * @package    Joyn_Broadcast
 * @since      1.0.0
 */

/* 방송 등록 모달 오버레이 */
.joyn-submit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.joyn-submit-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* 방송 등록 모달 컨테이너 */
.joyn-submit-modal-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: auto;
}

.joyn-submit-modal-overlay.active .joyn-submit-modal-container {
    transform: scale(1);
}

/* 모달 헤더 */
.joyn-submit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #667eea;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.joyn-submit-modal-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.joyn-submit-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.2s;
}

.joyn-submit-modal-close:hover {
    color: #ffebee;
}

/* 모달 바디 */
.joyn-submit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* 등록 타입 선택 */
.joyn-register-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.joyn-register-type-btn {
    flex: 1;
    padding: 15px 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.joyn-register-type-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.joyn-register-type-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.joyn-register-type-btn i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* 생방송 일정 선택 섹션 */
.joyn-live-schedule-section {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.joyn-live-schedule-section.active {
    display: block;
}

/* 방송 횟수 선택 */
.joyn-schedule-frequency {
    margin-bottom: 20px;
}

.joyn-schedule-frequency-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.joyn-schedule-frequency-buttons {
    display: flex;
    gap: 10px;
}

.joyn-frequency-btn {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #666;
}

.joyn-frequency-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.joyn-frequency-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* 주차 선택 */
.joyn-schedule-week-selector {
    margin-bottom: 20px;
}

.joyn-schedule-week-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.joyn-schedule-week-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.joyn-schedule-week-btn {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #666;
}

.joyn-schedule-week-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.joyn-schedule-week-btn.selected {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.joyn-schedule-days {
    margin-bottom: 20px;
}

.joyn-schedule-days-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.joyn-schedule-days-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.joyn-schedule-day-btn {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #666;
}

.joyn-schedule-day-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.joyn-schedule-day-btn.selected {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.joyn-schedule-time {
    margin-top: 20px;
}

.joyn-schedule-time-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.joyn-schedule-time-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.joyn-schedule-time-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 카테고리 선택 (아이콘 제거) */
.joyn-category-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.joyn-category-radio {
    position: relative;
    cursor: pointer;
}

.joyn-category-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.joyn-category-card {
    padding: 12px 15px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.joyn-category-radio:hover .joyn-category-card {
    border-color: var(--cat-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

.joyn-category-radio input[type="radio"]:checked + .joyn-category-card,
.joyn-category-radio.selected .joyn-category-card {
    background: var(--cat-color, #667eea);
    border-color: var(--cat-color, #667eea);
    color: #fff;
}

/* 폼 스타일 */
.joyn-form-section {
    margin-bottom: 30px;
}

.joyn-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.joyn-form-group {
    margin-bottom: 20px;
}

.joyn-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.joyn-label .required {
    color: #ef4444;
}

.joyn-input,
.joyn-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.joyn-input:focus,
.joyn-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.joyn-textarea {
    resize: vertical;
    min-height: 100px;
}

.joyn-form-help {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.joyn-form-actions {
    margin-top: 30px;
    text-align: center;
}

.joyn-btn-primary {
    padding: 15px 40px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.joyn-btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.joyn-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 알림 메시지 */
.joyn-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.joyn-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.joyn-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .joyn-submit-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .joyn-submit-modal-body {
        padding: 20px;
    }
    
    .joyn-register-type-selector {
        flex-direction: column;
    }
    
    .joyn-category-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}
