/**
 * Slope Calculator Styles
 * English localized styles for Slope Calculator
 *
 * @package Zipper
 */

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

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

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

.slpc-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);
    transition: box-shadow 0.2s ease;
}

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

.slpc-compact-section {
    gap: 12px;
}

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

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

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

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

.slpc-point-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #efe8d8;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffefb 0%, #faf7f0 100%);
}

.slpc-point-title {
    font-size: 14px;
    font-weight: 800;
    color: #8a6500;
}

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

.slpc-settings-grid {
    grid-template-columns: minmax(0, 220px);
}

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

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

.slpc-input,
.slpc-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;
}

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

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

.slpc-help-text,
.slpc-visual-caption {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #7a756d;
}

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

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

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

.slpc-preset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    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;
}

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

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

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

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

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

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

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

.slpc-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: 800;
    letter-spacing: 0.01em;
}

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

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

.slpc-status-badge.is-warning {
    background: rgba(255, 185, 0, 0.16);
    color: #8a6500;
}

.slpc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.slpc-hero-value {
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 800;
    line-height: 1.08;
    color: #2d2a26;
    word-break: keep-all;
}

.slpc-hero-label {
    font-size: 14px;
    font-weight: 700;
    color: #6f675d;
}

.slpc-hero-measures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.slpc-measure-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.slpc-measure-name {
    font-size: 12px;
    font-weight: 700;
    color: #7a756d;
}

.slpc-measure-card strong {
    font-size: 18px;
    font-weight: 800;
    color: #2d2a26;
}

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

.slpc-formula-box {
    padding: 12px 14px;
    border: 1px dashed rgba(212, 175, 55, 0.36);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #5f5a56;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

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

.slpc-kpi-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #ebe7de;
    border-radius: 14px;
    background: #fff;
}

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

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

.slpc-visual-section,
.slpc-step-section {
    gap: 12px;
}

.slpc-visual-wrap,
.slpc-table-wrap {
    min-width: 0;
}

.slpc-plot-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 220px;
    border: 1px solid #eee7d2;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffef9 0%, #faf6eb 100%);
}

.slpc-axis-line {
    stroke: rgba(122, 117, 109, 0.45);
    stroke-width: 1.5;
}

.slpc-guide-line {
    stroke: rgba(212, 175, 55, 0.65);
    stroke-width: 2;
    stroke-dasharray: 6 5;
}

.slpc-main-line {
    stroke: #c28f0e;
    stroke-width: 3.5;
    stroke-linecap: round;
}

.slpc-point {
    stroke: #fff;
    stroke-width: 2;
}

.slpc-point-a {
    fill: #8a6500;
}

.slpc-point-b {
    fill: #d4af37;
}

.slpc-point-mid {
    fill: #5f5a56;
}

.slpc-plot-label,
.slpc-axis-label {
    font-size: 12px;
    font-weight: 700;
    fill: #5f5a56;
}

.slpc-mid-label {
    fill: #8a6500;
}

.slpc-axis-label {
    fill: #8a6500;
}

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

.slpc-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.slpc-summary-table th,
.slpc-summary-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0ece4;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.5;
}

.slpc-summary-table th {
    width: 38%;
    color: #7a756d;
    font-weight: 700;
}

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

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

.slpc-equation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.slpc-equation-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #efe8d8;
    border-radius: 12px;
    background: #fffcf6;
}

.slpc-equation-item-full {
    grid-column: 1 / -1;
}

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

.slpc-equation-item strong {
    font-size: 14px;
    line-height: 1.6;
    color: #2d2a26;
    word-break: keep-all;
}

@media (max-width: 900px) {
    .slpc-input,
    .slpc-select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .slpc-point-grid,
    .slpc-kpi-grid,
    .slpc-support-grid,
    .slpc-equation-list {
        grid-template-columns: 1fr;
    }

    .slpc-hero-measures {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .slpc-field-grid,
    .slpc-settings-grid,
    .slpc-btn-group {
        grid-template-columns: 1fr;
    }

    .slpc-btn-group {
        display: grid;
    }

    .slpc-hero-measures {
        grid-template-columns: 1fr;
    }

    .slpc-kpi-value {
        font-size: 22px;
    }

    .slpc-hero-value {
        font-size: clamp(28px, 8vw, 40px);
    }
}

@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .slpc-section,
    .slpc-point-card,
    .slpc-result-hero,
    .slpc-kpi-card,
    .slpc-equation-item {
        padding-left: 14px;
        padding-right: 14px;
    }

    .slpc-summary-table th,
    .slpc-summary-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slpc-section,
    .slpc-input,
    .slpc-select,
    .slpc-copy-btn,
    .slpc-preset-btn {
        transition: none !important;
    }

    .slpc-section:hover,
    .slpc-copy-btn:hover,
    .slpc-preset-btn:hover {
        transform: none !important;
    }
}
