/**
 * Biorhythm Calculator Styles
 * 바이오리듬 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 메인 레이아웃 (그래프 전체 폭) ===== */
.brc-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 컨트롤 영역 ===== */
.brc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brc-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brc-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #5f5a56;
    white-space: nowrap;
}

.brc-input-group label i {
    color: #d4af37;
    margin-right: 4px;
}

/* 날짜 입력 */
.brc-date-input {
    display: block;
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brc-date-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
    background: #fff;
}

/* 기준 날짜 그룹 */
.brc-target-date-group {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.brc-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #fff;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
}

.brc-nav-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.brc-today-btn {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d4af37;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    cursor: pointer;
    transition: all 0.2s;
}

.brc-today-btn:hover {
    background: #d4af37;
    color: #fff;
}

.brc-current-date {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    min-width: 120px;
    text-align: center;
}

/* ===== 그래프 영역 (100% 폭) ===== */
.brc-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.brc-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.brc-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brc-chart-title i {
    color: #d4af37;
}

.brc-legend {
    display: flex;
    gap: 16px;
}

.brc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5f5a56;
}

.brc-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.brc-legend-color.physical {
    background: #e74c3c;
}

.brc-legend-color.emotional {
    background: #27ae60;
}

.brc-legend-color.intellectual {
    background: #3498db;
}

.brc-chart-wrapper {
    width: 100%;
    position: relative;
}

#brcChart {
    width: 100%;
    height: 280px;
    display: block;
}

/* ===== 대기 상태 ===== */
.brc-waiting {
    text-align: center;
    padding: 60px 20px;
    color: #a09a94;
}

.brc-waiting i {
    font-size: 60px;
    margin-bottom: 16px;
    display: block;
}

.brc-waiting p {
    font-size: 16px;
    margin: 0;
}

/* ===== 결과 영역 ===== */
.brc-result-section {
    display: none;
}

.brc-result-section.active {
    display: block;
}

/* 오늘의 바이오리듬 카드 */
.brc-today-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.brc-cycle-card {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.brc-cycle-card:hover {
    border-color: var(--cycle-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.brc-cycle-card.physical {
    --cycle-color: #e74c3c;
}

.brc-cycle-card.emotional {
    --cycle-color: #27ae60;
}

.brc-cycle-card.intellectual {
    --cycle-color: #3498db;
}

.brc-cycle-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
}

.brc-cycle-icon i {
    font-size: 22px;
    color: var(--cycle-color);
}

.brc-cycle-name {
    font-size: 14px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
}

.brc-cycle-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--cycle-color);
    line-height: 1;
    margin-bottom: 4px;
}

.brc-cycle-value span {
    font-size: 18px;
    font-weight: 500;
}

.brc-cycle-status {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.brc-cycle-status.high {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.brc-cycle-status.low {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.brc-cycle-status.critical {
    background: rgba(255, 185, 0, 0.15);
    color: #d68910;
}

/* 위험일 안내 */
.brc-critical-section {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 185, 0, 0.08);
    border: 1px solid rgba(255, 185, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.brc-critical-section.hidden {
    display: none;
}

.brc-critical-section i {
    color: #d68910;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.brc-critical-content {
    flex: 1;
}

.brc-critical-title {
    font-size: 14px;
    font-weight: 600;
    color: #d68910;
    margin-bottom: 4px;
}

.brc-critical-text {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.5;
}

/* 면책 조항 */
.brc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(108, 117, 125, 0.08);
    border-radius: 8px;
    margin-top: 16px;
}

.brc-disclaimer i {
    color: #6c757d;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.brc-disclaimer span {
    font-size: 14px;
    color: #5f5a56;
    line-height: 1.5;
}

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 768px) {
    .brc-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .brc-input-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .brc-date-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .brc-nav-group {
        margin-left: 0;
        justify-content: center;
    }

    .brc-today-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .brc-cycle-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 12px 16px;
        gap: 14px;
    }

    .brc-cycle-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .brc-cycle-info {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .brc-cycle-name {
        margin-bottom: 0;
    }

    .brc-cycle-value {
        font-size: 26px;
        margin-bottom: 0;
    }

    .brc-legend {
        flex-wrap: wrap;
        gap: 10px;
    }

    #brcChart {
        height: 220px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 480px) {
    .brc-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .brc-target-date-group {
        justify-content: flex-start;
    }

    .brc-date-inputs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .brc-date-inputs select {
        font-size: 14px;
        padding: 8px 8px;
        padding-right: 24px;
    }

    .brc-current-date {
        font-size: 14px;
        min-width: 100px;
    }

    .brc-chart-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .brc-cycle-value {
        font-size: 22px;
    }

    #brcChart {
        height: 200px;
    }
}
