/**
 * One-Rep Max Calculator Styles
 * Shared 1RM calculator styles (Japanese locale)
 *
 * @package Zipper
 */

#ormTool {
    color: #2d2a26;
}

#ormTool .orm-lead {
    margin: 10px 0 18px;
    color: #5f5a56;
    line-height: 1.62;
}

#ormTool .orm-top-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

#ormTool .orm-top-input-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

#ormTool .orm-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

#ormTool .orm-input-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #fffcf6;
    padding: 10px;
}

#ormTool .orm-label {
    font-size: 12px;
    color: #2d2a26;
    font-weight: 600;
}

#ormTool .orm-input,
#ormTool .orm-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fffdf8;
    color: #2d2a26;
    padding: 8px 10px;
    font-size: 14px;
}

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

#ormTool .orm-formula-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

#ormTool .orm-formula-chip {
    border: 1px solid #ddd7cb;
    background: #fffdf8;
    color: #2d2a26;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#ormTool .orm-formula-chip:hover {
    border-color: #d4af37;
    background: #f7f0e2;
}

#ormTool .orm-formula-chip:focus-visible {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.24);
}

#ormTool .orm-formula-chip.active {
    border-color: #d4af37;
    background: #fdf2cc;
    font-weight: 600;
}

#ormTool .orm-context-note {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e4dbc9;
    border-radius: 10px;
    background: #fff8ea;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.52;
}

#ormTool .orm-action-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #e6dcc8;
    border-radius: 12px;
    background: linear-gradient(135deg, #fffaf0 0%, #f8f1e4 100%);
}

#ormTool .orm-action-row .tool-btn {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d8cfbf;
    background: #fffdf8;
    color: #4f473d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(45, 42, 38, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

#ormTool .orm-action-row .tool-btn i {
    font-size: 13px;
}

#ormTool .orm-action-row .tool-btn:hover {
    border-color: #cfbf99;
    background: #fff8ec;
    box-shadow: 0 3px 7px rgba(45, 42, 38, 0.1);
    transform: translateY(-1px);
}

#ormTool .orm-action-row .tool-btn:focus-visible {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

#ormTool .orm-action-row .tool-btn.tool-btn-primary {
    border-color: #c89f24;
    background: linear-gradient(135deg, #f7db83 0%, #e8c35d 100%);
    color: #3f3220;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.26);
}

#ormTool .orm-action-row .tool-btn.tool-btn-primary:hover {
    border-color: #b68d16;
    background: linear-gradient(135deg, #f3d371 0%, #deb24a 100%);
}

#ormTool .orm-action-row .tool-btn.tool-btn-secondary {
    background: #f3eee4;
    color: #5c5348;
}

#ormTool .orm-action-row .tool-btn.tool-btn-secondary:hover {
    background: #ece4d6;
}

#ormTool .orm-action-row .tool-btn.tool-btn-excel {
    background: #59ab79;
    border-color: #59ab79;
    color: #ffffff;
}

#ormTool .orm-action-row .tool-btn.tool-btn-excel:hover,
#ormTool .orm-action-row .tool-btn.tool-btn-excel:focus-visible {
    background: #4f9f70;
    border-color: #4f9f70;
    color: #ffffff;
}

#ormTool .orm-quick-panel {
    border: 1px solid #d7d2c7;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3f2ef 0%, #ebe8e1 100%);
    color: #2d2a26;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
    padding: 12px 12px 10px;
}

#ormTool .orm-quick-title {
    margin: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
}

#ormTool .orm-quick-meta {
    margin: 8px 0 10px;
    text-align: center;
    font-size: 12px;
    color: #5f5a56;
}

#ormTool .orm-quick-kpi {
    margin-bottom: 10px;
    border: 1px solid #d6cebd;
    border-radius: 12px;
    background: #fffdf8;
    text-align: center;
    padding: 10px;
}

#ormTool .orm-quick-kpi-label {
    font-size: 12px;
    color: #5f5a56;
    margin-bottom: 4px;
}

#ormTool .orm-quick-kpi-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d2a26;
}

#ormTool .orm-quick-table-wrap {
    overflow-x: auto;
}

#ormTool .orm-quick-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#ormTool .orm-quick-table th,
#ormTool .orm-quick-table td {
    border: 1px solid #d9d2c6;
    padding: 6px 8px;
    text-align: left;
    color: #2d2a26;
    background: #fffdf8;
}

#ormTool .orm-quick-table thead th {
    background: #f7f1e4;
    font-weight: 700;
}

#ormTool .orm-quick-table tbody tr:first-child th,
#ormTool .orm-quick-table tbody tr:first-child td {
    font-weight: 700;
    background: #fdf2cc;
}

#ormTool .orm-message-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

#ormTool .orm-message {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: #5f5a56;
}

#ormTool .orm-message-warning {
    color: #8c6a17;
}

#ormTool .orm-waiting {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7e6;
    border: 1px dashed #d4af37;
    color: #2d2a26;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

#ormTool .orm-result {
    border: 1px solid #ddd7cb;
    border-radius: 12px;
    background: #fffcf6;
    padding: 12px;
}

#ormTool .orm-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

#ormTool .orm-summary-card {
    border: 1px solid #ddd7cb;
    background: #fffdf8;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#ormTool .orm-summary-label {
    font-size: 12px;
    color: #5f5a56;
}

#ormTool .orm-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.3;
}

#ormTool .orm-panel {
    display: block;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    background: #fffdf8;
    padding: 10px;
    margin-bottom: 10px;
}

#ormTool .orm-panel[aria-hidden="true"] {
    display: block;
}

#ormTool .orm-panel.active {
    display: block;
}

#ormTool .orm-detail-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

#ormTool .orm-detail-panel {
    min-width: 0;
    margin-bottom: 0;
    padding: 10px;
}

#ormTool .orm-detail-panel .orm-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#ormTool .orm-detail-panel .orm-table {
    min-width: 0;
}

#ormTool .orm-panel-title {
    margin: 0 0 8px;
    font-size: 15px;
    color: #2d2a26;
}

#ormTool .orm-table-wrap {
    overflow-x: auto;
}

#ormTool .orm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
}

#ormTool .orm-table th,
#ormTool .orm-table td {
    border: 1px solid #ddd7cb;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
    color: #2d2a26;
}

#ormTool .orm-table thead th {
    background: #f6efdd;
    white-space: nowrap;
}

#ormTool .orm-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid #b7aea0;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    color: #5f5a56;
    background: #faf9f7;
}

#ormTool .orm-chart-wrap {
    position: relative;
    height: 240px;
    min-height: 220px;
}

#ormTool #ormFormulaChart {
    width: 100% !important;
    height: 100% !important;
}

#ormTool .orm-chart-fallback {
    border: 1px dashed #d4af37;
    border-radius: 10px;
    background: #fff7e6;
    padding: 10px;
}

#ormTool .orm-fallback-note {
    margin: 0 0 8px;
    font-size: 13px;
    color: #5f5a56;
}

#ormTool .orm-reference-note {
    margin: 0 0 10px;
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.55;
}

#ormTool .orm-disclaimer {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #5f5a56;
    background: #f9f3e5;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.56;
}

#ormTool .orm-hidden {
    display: none !important;
}

/* UI Guard marker: Excel button warm-green token */
#ormTool .orm-action-row .tool-btn.tool-btn-excel {
    background: #59ab79;
    border-color: #59ab79;
}

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

@media (max-width: 900px) {
    #ormTool .orm-top-layout {
        grid-template-columns: 1fr;
    }

    #ormTool .orm-input-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    #ormTool .orm-action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #ormTool .orm-summary-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

@media (max-width: 768px) {
    #ormTool .orm-detail-split {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #ormTool .orm-formula-picker {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #ormTool .orm-quick-kpi-value {
        font-size: 24px;
    }

    #ormTool .orm-chart-wrap {
        height: 220px;
    }
}

@media (max-width: 480px) {
    #ormTool .orm-input-grid {
        grid-template-columns: 1fr;
    }

    #ormTool .orm-action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #ormTool .orm-action-row .tool-btn {
        min-height: 34px;
        padding: 7px 8px;
        font-size: 11px;
    }

    #ormTool .orm-formula-picker {
        grid-template-columns: 1fr;
    }

    #ormTool .orm-summary-grid {
        grid-template-columns: 1fr;
    }

    #ormTool .orm-summary-value {
        font-size: 17px;
    }

    #ormTool .orm-chart-wrap {
        height: 200px;
    }
}

#ormTool #ormPanelReference .orm-table tbody tr:nth-child(odd) {
    background: #fffaf0;
}

#ormTool #ormPanelReference .orm-table td:nth-child(5) {
    font-weight: 600;
}
