/**
 * Commercial/Officetel Rental Yield Calculator Styles
 * 상가/오피스텔 임대수익률 계산기
 */

/* ===== 2컬럼 레이아웃 ===== */
.cory-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: start;
}

.cory-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cory-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 공통 섹션 ===== */
.cory-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    transition: box-shadow 0.2s ease;
}

.cory-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

.cory-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
}

.cory-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 입력 ===== */
.cory-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.cory-input-group:last-child {
    margin-bottom: 0;
}

.cory-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.cory-input-row:last-of-type {
    margin-bottom: 0;
}

.cory-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.cory-amount-input,
.cory-number-input,
.cory-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cory-amount-input,
.cory-select {
    padding: 10px 12px;
    font-size: 14px;
}

.cory-number-input {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.cory-amount-input {
    font-weight: 600;
    text-align: right;
}

.cory-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.cory-amount-input:hover,
.cory-number-input:hover,
.cory-select:hover {
    border-color: #d4c67a;
}

.cory-amount-input:focus,
.cory-number-input:focus,
.cory-select:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.cory-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.cory-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.cory-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

/* ===== 버튼 ===== */
.cory-btn-group {
    display: flex;
    gap: 8px;
}

.cory-calc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
    transition: all 0.2s;
}

.cory-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.cory-reset-btn {
    padding: 12px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #f5f3f0;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cory-reset-btn:hover {
    border-color: #d4c67a;
    background: #f1eee8;
}

/* ===== 결과 요약 ===== */
.cory-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #e8e0c8;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.cory-summary-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 6px;
}

.cory-property-label {
    font-size: 12px;
    color: #8c8578;
    margin-bottom: 12px;
}

.cory-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.cory-summary-item {
    background: #fff;
    border: 1px solid #eee7d9;
    border-radius: 10px;
    padding: 10px;
}

.cory-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #8c8578;
    margin-bottom: 4px;
}

.cory-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.cory-summary-item.is-kpi .cory-summary-value {
    font-size: 22px;
    color: #b58913;
}

.cory-core-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #e3d8bb;
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

.cory-pass-text {
    color: #1f7a47;
    font-weight: 700;
    font-size: 13px;
}

.cory-fail-text {
    color: #b23a2a;
    font-weight: 700;
    font-size: 13px;
}

/* ===== 차트 ===== */
.cory-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cory-chart-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.cory-chart-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 10px;
}

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

.cory-donut-wrap,
.cory-bar-wrap {
    position: relative;
    width: 100%;
}

.cory-donut-wrap {
    height: 240px;
}

.cory-bar-wrap {
    height: 260px;
}

.cory-donut-wrap canvas,
.cory-bar-wrap canvas {
    max-height: 260px;
}

.cory-chart-fallback {
    margin-top: 8px;
    font-size: 12px;
    color: #9e9a96;
    text-align: center;
    padding: 8px;
    background: #faf9f7;
    border: 1px dashed #e8e4dc;
    border-radius: 8px;
}

/* ===== 테이블 ===== */
.cory-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.cory-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #217346;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.cory-download-btn:hover {
    background: #1a5c38;
}

.cory-table-wrap {
    overflow-x: auto;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #fff;
}

.cory-table-subtitle {
    margin: 12px 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #5f5a56;
}

.cory-detail-table,
.cory-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.cory-detail-table th,
.cory-detail-table td,
.cory-compare-table th,
.cory-compare-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #efebe3;
    font-size: 12px;
    text-align: left;
}

.cory-detail-table th,
.cory-compare-table th {
    background: #faf9f7;
    color: #5f5a56;
    font-weight: 700;
}

.cory-detail-table td:nth-child(2),
.cory-compare-table td:nth-child(2) {
    text-align: right;
    font-weight: 600;
    color: #2d2a26;
}

.cory-detail-table td:nth-child(3) {
    color: #8c8578;
}

.cory-highlight-row td {
    background: #fdfbf5;
}

/* ===== waiting / 안내 ===== */
.cory-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

.cory-waiting i {
    display: block;
    margin-bottom: 12px;
    font-size: 32px;
    color: #d4af37;
    opacity: 0.4;
}

.cory-waiting p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.cory-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

.cory-disclaimer i {
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 2px;
}

.cory-hidden {
    display: none !important;
}

/* ===== 반응형 ===== */
@media (max-width: 1100px) {
    .cory-main-layout {
        grid-template-columns: 320px 1fr;
    }

    .cory-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .cory-main-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cory-input-col {
        position: static;
        max-width: 100%;
        overflow: hidden;
    }

    .cory-section {
        max-width: 100%;
        overflow: hidden;
    }

    .cory-input-group input:not([type="radio"]):not([type="checkbox"]),
    .cory-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cory-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cory-input-row,
    .cory-summary-grid {
        grid-template-columns: 1fr;
    }

    .cory-btn-group {
        flex-direction: column;
    }

    .cory-calc-btn,
    .cory-reset-btn {
        width: 100%;
    }

    .cory-summary-value {
        font-size: 16px;
    }

    .cory-summary-item.is-kpi .cory-summary-value {
        font-size: 19px;
    }

    .cory-main-layout,
    .cory-input-col,
    .cory-result-col {
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cory-section,
    .cory-amount-input,
    .cory-number-input,
    .cory-select,
    .cory-calc-btn,
    .cory-reset-btn {
        transition: none !important;
    }

    .cory-calc-btn:hover {
        transform: none !important;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

