/**
 * Plugin Card Styles
 * 플러그인 전용 카드 스타일 - kaice-oes 플러그인에서만 사용하는 특별한 스타일
 */

/* ===========================================
   플러그인 전용 카드 스타일 오버라이드
   =========================================== */

/* 플러그인 네임스페이스 내 카드 스타일 */
.kaice-oes .card-title .kaice-icon {
    color: var(--theme-text-emphasis);
    flex-shrink: 0;
}

/* 플러그인 전용 아이콘 스타일 */
.kaice-oes .kaice-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* Font Awesome 아이콘은 기본 크기 사용 */
.kaice-oes .kaice-icon.fas,
.kaice-oes .kaice-icon.far,
.kaice-oes .kaice-icon.fab {
    width: auto;
    height: auto;
    font-size: var(--theme-font-size-title);
}

/* ===========================================
   시험 카드 스타일 (플러그인 전용)
   =========================================== */

/* 시험 카드 컨테이너 */
.kaice-oes .exam-card {
    background: #fff;
    border-radius: var(--theme-card-radius);
    border: 1px solid var(--theme-item-border);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.kaice-oes .exam-card:hover:not([data-status="upcoming"]):not([data-status="completed"]):not(.exam-card-disabled) {
    border-color: var(--theme-main-color);
    box-shadow: 0 2px 4px rgba(64, 128, 144, 0.1);
}

/* 클릭 가능한 카드 커서 스타일 */
.kaice-oes .exam-card.oes-exam-card-clickable {
    cursor: pointer;
}

/* 시험 카드 헤더 */
.kaice-oes .exam-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--theme-card-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.kaice-oes .exam-title {
    font-size: var(--theme-font-size-title);
    font-weight: 600;
    color: var(--theme-text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--theme-font-bold);
    line-height: 1.2;
    flex: 1;
}

.kaice-oes .exam-title .kaice-icon {
    color: var(--theme-text-emphasis);
    flex-shrink: 0;
}

.kaice-oes .exam-description {
    font-size: var(--theme-font-size-body);
    color: #666;
    line-height: 1.5;
    margin: 0;
    font-family: var(--theme-font-normal);
}

/* 시험 카드 콘텐츠 */
.kaice-oes .exam-info {
    padding: 1.5rem;
    background-color: var(--theme-item-bg);
    border-bottom: 1px solid var(--theme-card-border);
}

.kaice-oes .info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-family: var(--theme-font-normal);
    font-size: var(--theme-font-size-body);
    color: var(--theme-text-color);
    border-bottom: 1px solid var(--theme-card-border);
}

/* 마지막 info-row의 구분선 제거 */
.kaice-oes .info-row:last-child {
    border-bottom: none;
}

.kaice-oes .info-row .kaice-icon {
    color: var(--theme-info-text);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    font-size: var(--theme-font-size-icon-small);
}

.kaice-oes .info-row.info-left-align {
    justify-content: flex-start;
    text-align: left;
}

/* 시험 카드 푸터 */
.kaice-oes .exam-footer {
    padding: 1rem 1.5rem;
    background-color: var(--theme-item-bg);
    margin-top: auto;
    text-align: center;
}

/* ===========================================
   액세스 코드 섹션 (플러그인 전용)
   =========================================== */

.kaice-oes .access-code-section {
    padding: 1.5rem;
    background: var(--theme-item-bg);
}

.kaice-oes .access-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.kaice-oes .access-header h4 {
    font-size: var(--theme-font-size-input);
    font-weight: 600;
    color: var(--theme-text-color);
    margin: 0;
    font-family: var(--theme-font-bold);
}

.kaice-oes .access-header .kaice-icon {
    color: var(--theme-text-emphasis);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    font-size: var(--theme-font-size-icon-base);
}

.kaice-oes .access-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kaice-oes .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kaice-oes .input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--theme-item-border);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-input);
    font-family: var(--theme-font-normal);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.kaice-oes .input-group input:focus {
    outline: none;
    border-color: var(--theme-main-color);
    box-shadow: 0 0 0 3px rgba(64, 128, 144, 0.1);
}

.kaice-oes .access-hint {
    font-family: var(--theme-font-normal);
    font-size: var(--theme-font-size-body);
    color: var(--theme-info-text);
    margin: 0;
    font-style: normal;
}

/* ===========================================
   상태별 카드 스타일 (플러그인 전용)
   =========================================== */

/* 예정 상태 카드 */
.kaice-oes .exam-card[data-status="upcoming"] {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.kaice-oes .exam-card[data-status="upcoming"]:hover {
    border-color: var(--theme-item-border);
    box-shadow: none;
}

.kaice-oes .exam-card[data-status="upcoming"] .exam-footer {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* 종료된 상태 카드 */
.kaice-oes .exam-card[data-status="completed"] {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.kaice-oes .exam-card[data-status="completed"]:hover {
    border-color: var(--theme-item-border);
    box-shadow: none;
}

.kaice-oes .exam-card[data-status="completed"] .exam-footer {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* 비활성화된 카드 공통 스타일 */
.kaice-oes .exam-card.exam-card-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.kaice-oes .exam-card.exam-card-disabled:hover {
    border-color: var(--theme-item-border);
    box-shadow: none;
}

/* 상태에 따른 액세스 코드 영역 숨김 */
.kaice-oes .exam-card[data-status="upcoming"] .access-code-section,
.kaice-oes .exam-card[data-status="completed"] .access-code-section,
.kaice-oes .exam-card.exam-card-disabled .access-code-section {
    display: none;
}

/* 액세스 코드 영역이 활성화됐 때 푸터 숨김 */
.kaice-oes .exam-card.access-code-expanded .exam-footer {
    display: none !important;
}

@keyframes kaice-oes-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   플러그인 전용 폼 스타일
   =========================================== */

.kaice-oes .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kaice-oes .form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ===========================================
   플러그인 전용 뱃지 스타일
   =========================================== */

.kaice-oes .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-body);
    font-weight: 500;
    color: white;
    text-align: center;
    font-family: var(--theme-font-bold);
}

/* 뱃지 영역 */
.kaice-oes .badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ===========================================
   플러그인 전용 로그인 관련 스타일
   =========================================== */

.kaice-oes .login-required {
    color: var(--theme-text-emphasis);
    font-weight: 500;
    font-size: var(--theme-font-size-body);
    margin: 0;
    font-family: var(--theme-font-bold);
}

/* ===========================================
   플러그인 전용 푸터 노트 스타일
   =========================================== */

.kaice-oes .upcoming-footer,
.kaice-oes .completed-footer {
    padding: 0.75rem 1.5rem;
    background-color: var(--theme-item-bg);
}

.kaice-oes .upcoming-note,
.kaice-oes .completed-note {
    font-size: var(--theme-font-size-body);
    color: var(--theme-info-text);
    margin: 0;
    font-style: normal;
    font-family: var(--theme-font-normal);
}

/* ===========================================
   플러그인 전용 액션 영역
   =========================================== */

.kaice-oes .actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--theme-card-border);
}

.kaice-oes .actions .btn {
    width: 100%;
}

/* ===========================================
   플러그인 전용 반응형 디자인
   =========================================== */

@media (max-width: 768px) {
    .kaice-oes .form-grid {
        grid-template-columns: 1fr;
    }
    
    .kaice-oes .exam-card {
        margin-bottom: 1rem;
    }
    
    .kaice-oes .exam-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }
    
    .kaice-oes .badges {
        align-self: flex-start;
        margin-top: 0.5rem;
    }
    
    .kaice-oes .exam-info,
    .kaice-oes .access-code-section {
        padding: 1rem;
    }
    
    .kaice-oes .exam-footer {
        padding: 0.75rem 1rem;
    }
    
    .kaice-oes .exam-title {
        font-size: var(--theme-font-size-subtitle);
    }
    
    .kaice-oes .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .kaice-oes .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .kaice-oes .exam-header,
    .kaice-oes .exam-info,
    .kaice-oes .access-code-section {
        padding: 0.75rem;
    }
    
    .kaice-oes .exam-title {
        font-size: var(--theme-font-size-input);
    }
}

/* ===========================================
   플러그인 전용 애니메이션
   =========================================== */

.kaice-oes .exam-card,
.kaice-oes .card {
    animation: kaice-oes-fadeInUp 0.4s ease forwards;
}

.kaice-oes .exam-card:nth-child(2) { animation-delay: 0.1s; }
.kaice-oes .exam-card:nth-child(3) { animation-delay: 0.2s; }
.kaice-oes .exam-card:nth-child(4) { animation-delay: 0.3s; }
.kaice-oes .exam-card:nth-child(5) { animation-delay: 0.4s; }

@keyframes kaice-oes-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   플러그인 전용 컨테이너
   =========================================== */

.kaice-oes.container {
    display: grid;
    gap: 15px;
    margin: 0 auto;
    font-family: var(--theme-font-normal);
}

/* ===========================================
   플러그인 전용 아이콘 공통 스타일
   =========================================== */

.kaice-oes .kaice-icon * {
    stroke: currentColor;
    fill: none;
}
