/* style-results.css - Result displays, penalty, notices */
/* Version: 9.9.3 (Latest Update) */

/* ================================== */
/* ?�▼???��? 계산�?모달 ?��???(?�규) ?�▼??*/
/* ================================== */
#installmentResult {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}
#installmentResult:empty { display: none; } /* 결과 없을 땐 빈 박스 숨김 */
body.dark-mode #installmentResult {
    background-color: #1b2433;
    border-color: #33415c;
}
body.dark-mode #installmentResult h4 { color: #7cb0f7; border-bottom-color: #33415c; }
body.dark-mode #installmentResult p { color: #cbd5e1; }
body.dark-mode #installmentResult p strong { color: #9aa7b8; }
body.dark-mode #installmentResult hr { border-top-color: #33415c; }
#installmentResult h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a73e8;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}
#installmentResult p {
    margin: 10px 0; /* ?�하 마진 조정 */
    font-size: 1.1em; /* ?�트 ?�기 ?�짝 ?��? */
    text-align: center; /* ?�스??중앙 ?�렬 */
    color: #333;
}
#installmentResult p strong {
    color: #495057;
    margin-right: 10px; /* ?�목�?�??�이 간격 */
}
#installmentResult hr {
    border: 0;
    border-top: 1px dashed #ced4da;
    margin: 15px 0;
}
.calculate-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
}
.calculate-btn:hover {
    background: #155ab6;
}
.result-box {
    display: none; /* Initially hidden */
}

/* ================================== */
/* ?�▼???��? 계산�?결과 ?�이�??��???(?�규) ?�▼??*/
/* ================================== */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}
.result-table thead {
    background-color: #e9ecef;
    font-weight: bold;
}
.result-table th, .result-table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: center;
}
.result-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* ================================== */
/* ?�▼??간편 계산�?모달 ?��???(?�규) ?�▼??*/
/* ================================== */
#simple-calculator-modal .modal-content {
    max-width: 1000px; /* Increased width for the table */
    max-height: 90vh; /* Increased height */
}

#simple-calculator-content h1, #simple-calculator-content h2 {
    color: #2c3e50;
    text-align: center;
}

#simple-calculator-content h1 {
    margin-bottom: 20px;
    font-size: 1.6em;
}

#simple-calculator-content h2 {
    font-size: 1.2em;
    color: #34495e;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 15px;
    margin-bottom: 15px;
}

#simple-calculator-content .options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
    min-height: 45px;
}

#simple-calculator-content .option-button {
    font-family: inherit;
    background-color: #ecf0f1;
    color: #34495e;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: keep-all;
    text-align: center;
}

#simple-calculator-content .option-button:hover {
    background-color: #dcdce2;
    transform: translateY(-2px);
}

#simple-calculator-content .option-button.selected {
    background-color: #3498db;
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

#simple-calculator-modal .simple-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

#simple-calculator-modal .simple-results-table thead {
    background-color: #f2f2f2;
}

#simple-calculator-modal .simple-results-table th, 
#simple-calculator-modal .simple-results-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
}

#simple-calculator-modal .simple-results-table th {
    font-weight: bold;
    color: #333;
}

#simple-calculator-modal .simple-results-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#simple-calculator-modal .simple-results-table tbody tr:hover {
    background-color: #f1f1f1;
}

#simple-calculator-modal .simple-results-table td:last-child {
    font-weight: bold;
    color: #d93025;
}

/* ================================== */
/* ?�▼??결합?�인 ?�세?�보 모달 ?��???(?�규) ?�▼??*/
/* ================================== */
.detail-view-btn {
    display: inline-block;
    background-color: #d93025;
    color: white;
    font-size: 0.85em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
}

.detail-view-btn:hover {
    background-color: #b71c1c;
}

#combinationInfoModal .modal-content {
    width: 95%;
    max-width: 800px;
    padding: 0; /* ???�역 ?�문??padding ?�거 ???��? 컨테?�너?�서 처리 */
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #333;
}

.combination-tabs {
    display: flex;
    background-color: #f1f3f4;
    border-bottom: 1px solid #ddd;
}

.combination-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.combination-tab:hover {
    background-color: #e8eaed;
}

.combination-tab.active {
    color: #1a73e8;
    border-bottom: 3px solid #1a73e8;
    background-color: #fff;
}

.combination-tab img {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
}

.combination-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.combination-table-wrapper {
    margin-bottom: 25px;
}

.combination-table-wrapper h3 {
    font-size: 1.1em;
    color: #1a73e8;
    margin-bottom: 10px;
    border-left: 4px solid #1a73e8;
    padding-left: 10px;
    text-align: left;
}

.combination-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.combination-table th, .combination-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.combination-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
}

.combination-table tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* ?�약�?계산�??�이?�웃 (2x2 그리?? */
#penalty-input-sections {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ?�택?�정 ?�션 ?�게 배치 (?�규) */
#penalty-seonyak-section {
    grid-column: span 2;
}

@media screen and (max-width: 768px) {
    #penalty-input-sections {
        grid-template-columns: 1fr;
    }
    
    /* 모바?�에?�는 ?�시 1?�로 */
    #penalty-seonyak-section {
        grid-column: span 1;
    }
}

