/* competition_detail.css */
.competition-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
.competition-header {
    margin-bottom: 24px;
    margin-left: 8px;
}

.competition-header-sub {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.competition-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

/* 상태 뱃지 기본 스타일 */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
}

/* 시작전/접수전 상태 */
.status-badge.시작전,
.status-badge.접수전 {
    background-color: var(--primary-color-10);
    color: var(--primary-color);
}

/* 접수중 상태 */
.status-badge.접수중 {
    background-color: var(--primary-color-5);
    color: var(--primary-color);
    border: 1px solid var(--primary-color-50);
}

/* 진행중 상태 */
.status-badge.진행중 {
    background-color: var(--primary-color);
    color: white;
}

/* 접수마감 상태 */
.status-badge.접수마감 {
    background-color: #FFE8E8;
    color: #E74C3C;
    border: 1px solid #e74d3c33;
}

/* 종료됨 상태 */
.status-badge.종료됨 {
    background-color: #7F8C8D;
    color: white;
}

/* 액션 버튼 */
.header-actions {
    position: relative;
}

.action-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.action-toggle:hover {
    background-color: var(--bg-light);
    color: var(--text-color);
}

.action-dialog {
    position: absolute;
    right: 0;
    top: 110%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px;
    min-width: 120px;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.action-dialog.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.action-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.action-button:hover {
    background-color: var(--bg-light);
}

.action-button.delete:hover {
    background-color: #FFE8E8;
    color: var(--danger-color);
}

/* 이미지 컨테이너 */
.image-container {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.competition_image {
    width: 100%;
    height: auto;
    display: block;
}

/* 정보 섹션 */
.competition-info {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.info-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.info-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-group p {
    margin: 8px 0;
    color: var(--text-color);
    line-height: 1.6;
}

.info-group strong {
    color: var(--text-color);
    font-weight: 500;
}

/* 버튼 섹션 */
.form-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

/* 접수하기 버튼 */
.registration-btn {
    display: block;
    text-align: center;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    font-size: 18px;
    transition: all 0.2s ease;
}

.registration-btn:hover {
    background-color: var(--primary-hover-color);
}

.registration-btn-container {
    margin-bottom: 24px;
}

.registration-btn-container.is-sticky {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background-color: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 부문 섹션 */
.divisions {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.divisions h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-color);
}

.division-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.division-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.division-item:last-child {
    border-bottom: none;
}

.division-name {
    font-weight: 500;
    color: var(--text-color);
}

.division-details {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 8px;
}

.pending-badge {
    white-space: nowrap;
    background-color: var(--bg-light);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .competition-detail-container {
        padding: 0;
    }

    .competition-header h1 {
        font-size: 24px;
    }

    .info-group {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .registration-btn {
        padding: 14px;
        font-size: 16px;
    }

    .registration-btn-container.is-sticky {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .form-section {
        grid-template-columns: 1fr;
    }

    .competition-header-sub {
        gap: 12px;
    }

    .header-actions {
        align-self: flex-end;
    }
}

.messages {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.selectable-text {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    color: var(--text-color);
    line-height: 1.6;
    word-break: break-word;
}

.selectable-text a {
    color: #1a73e8;  /* 구글 블루 같은 색 */
    text-decoration: underline;
    font-weight: 500;
}
