/**
 * Pythagorean Theorem Calculator Styles
 * 피타고라스 정리 계산기 전용 스타일
 *
 * @package Zipper
 */

.pytc-hidden,
.pytc-waiting[hidden],
.pytc-panel[hidden] {
    display: none !important;
}

.pytc-intro {
    display: grid;
    gap: 10px;
}

.pytc-lead {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.7;
    color: #5f5a56;
}

.pytc-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e8e4dc;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.pytc-compact-section {
    gap: 10px;
}

.pytc-preset-section,
.pytc-tip-section {
    background: #fffdf9;
}

.pytc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #2d2a26;
}

.pytc-section-title i {
    color: #d4af37;
}

.pytc-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pytc-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pytc-mode-tab:hover,
.pytc-mode-tab:focus {
    outline: none;
    border-color: #d4af37;
    color: #8a6500;
}

.pytc-mode-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.18);
}

.pytc-mode-help,
.pytc-field-hint,
.pytc-theorem-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #7a756d;
}


.pytc-panel.pytc-hidden {
    display: none !important;
}

.pytc-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.pytc-field-grid-compact {
    grid-template-columns: minmax(0, 220px);
}

.pytc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pytc-field-full {
    grid-column: 1 / -1;
}

.pytc-label {
    font-size: 13px;
    font-weight: 700;
    color: #5f5a56;
}

.pytc-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.pytc-input-wrap-select {
    grid-template-columns: minmax(0, 1fr);
}

.pytc-input,
.pytc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #fff;
    color: #2d2a26;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pytc-input:hover,
.pytc-select:hover {
    border-color: #d4c67a;
}

.pytc-input:focus,
.pytc-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.pytc-input-unit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pytc-btn-group {
    display: flex;
    gap: 8px;
}

.pytc-btn-group .tool-btn {
    flex: 1 1 0;
}

.pytc-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pytc-preset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pytc-preset-btn:hover,
.pytc-preset-btn:focus,
.pytc-preset-btn.is-active {
    outline: none;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
}

.pytc-tip-list,
.pytc-step-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #5f5a56;
    font-size: 14px;
    line-height: 1.65;
}

.pytc-waiting {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #eadfb8;
    border-radius: 12px;
    background: #fffaf0;
    color: #7a5d18;
}

.pytc-waiting i {
    font-size: 18px;
    color: #d4af37;
    margin-top: 2px;
}

.pytc-waiting p {
    margin: 0;
    line-height: 1.6;
}

.pytc-result-hero {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #eadfb8;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.14);
}

.pytc-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pytc-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pytc-status-badge.is-valid {
    background: rgba(70, 180, 80, 0.12);
    color: #267237;
}

.pytc-status-badge.is-neutral {
    background: rgba(212, 175, 55, 0.14);
    color: #8a6500;
}

.pytc-status-badge.is-alert {
    background: rgba(192, 64, 64, 0.12);
    color: #9c2d2d;
}

.pytc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    color: #8a6500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pytc-copy-btn:hover,
.pytc-copy-btn:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.pytc-hero-expression {
    font-size: 15px;
    font-weight: 700;
    color: #8a6500;
}

.pytc-hero-value {
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 800;
    line-height: 1;
    color: #2d2a26;
}

.pytc-hero-label {
    font-size: 14px;
    font-weight: 700;
    color: #5f5a56;
}

.pytc-hero-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #5f5a56;
}

.pytc-formula-box {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed #d8c892;
    color: #5a4c1d;
    font-size: 14px;
    line-height: 1.6;
    word-break: keep-all;
}

.pytc-table-wrap {
    overflow-x: auto;
}

.pytc-summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.pytc-summary-table th,
.pytc-summary-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #efeae1;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
}

.pytc-summary-table th {
    width: 36%;
    color: #5f5a56;
    font-weight: 700;
}

.pytc-summary-table td {
    color: #2d2a26;
    font-weight: 600;
}

.pytc-summary-table tr:last-child th,
.pytc-summary-table tr:last-child td {
    border-bottom: 0;
}

.pytc-theorem-card {
    background: linear-gradient(180deg, #fffefb 0%, #fff9ef 100%);
}

.pytc-theorem-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pytc-theorem-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(70, 180, 80, 0.12);
    color: #267237;
    font-size: 12px;
    font-weight: 700;
}

.pytc-theorem-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.pytc-theorem-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #eadfb8;
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.pytc-theorem-name {
    font-size: 13px;
    font-weight: 700;
    color: #7a756d;
}

.pytc-theorem-box strong {
    font-size: 28px;
    line-height: 1.1;
    color: #2d2a26;
}

.pytc-theorem-equals {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #b8860b;
}

.pytc-theorem-diff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.pytc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.pytc-kpi-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
}

.pytc-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.pytc-kpi-value {
    font-size: 20px;
    font-weight: 800;
    color: #2d2a26;
    line-height: 1.2;
}

@media (max-width: 980px) {
    .pytc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pytc-field-grid,
    .pytc-field-grid-compact,
    .pytc-theorem-grid,
    .pytc-kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .pytc-theorem-equals {
        display: none;
    }

    .pytc-summary-table th,
    .pytc-summary-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .pytc-summary-table tr {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid #efeae1;
    }

    .pytc-summary-table tr:last-child {
        border-bottom: 0;
    }

    .pytc-summary-table th,
    .pytc-summary-table td {
        border-bottom: 0;
    }
}
