/* === 1RM CALCULATOR STYLES === */

body.page-template-orm-calculator,
body.page-template-orm-calculator-de,
body.page-template-orm-calculator-fr {
    background: var(--na-bg-calc, #0d0d12);
    margin: 0;
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.orm-wrapper {
    min-height: 100vh;
    background: var(--na-bg-calc, #0d0d12);
    padding: 20px 20px 40px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: calc(var(--na-navbar-height, 70px) + 30px);
}

#orm-app {
    background: var(--na-bg-calc-card, #14141a);
    border-radius: 16px;
    padding: 8px 20px 20px 20px;
    max-width: 500px;
    width: 100%;
    color: #dce2ea;
}

.orm-info-block {
    background: var(--na-bg-calc-section, #1a1a22);
    border-radius: 10px;
    margin-bottom: 16px;
    margin-top: 8px;
    overflow: hidden;
}

.orm-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.orm-header:hover { background: var(--na-bg-calc-hover, #1e1e28); }

.orm-title {
    text-align: center;
    font-size: 1.65rem;
    margin: 0;
    padding: 18px 12px 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #dce2ea;
}

.orm-header-arrow {
    width: 14px;
    height: 10px;
    margin-left: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238a8fa0' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.orm-header-arrow.open { transform: rotate(180deg); }

#orm-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#orm-info-content > div {
    padding: 16px;
    color: #8a8f9e;
    font-size: 0.85rem;
    line-height: 1.6;
}

#orm-info-content h2 {
    color: #dce2ea;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

#orm-info-content h2:first-child { margin-top: 0; }

#orm-info-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

#orm-info-content li {
    margin-bottom: 4px;
}

.orm-answer-first {
    color: #8a8f9e;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    font-weight: 400;
}

.orm-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.orm-input-weight { flex: 1.2; }
.orm-input-reps { flex: 0.8; }

.orm-input-section {
    background: var(--na-bg-calc-section, #1a1a22);
    border-radius: 10px;
    padding: 10px 12px;
}

.orm-input-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #5a5f6e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.orm-input-group {
    display: flex;
    gap: 8px;
}

.orm-input-group input[type="number"] {
    flex: 1;
    background: var(--na-bg-calc-input, #22222c);
    border: 1px solid #2a2a36;
    color: #dce2ea;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.orm-input-group input::-webkit-outer-spin-button,
.orm-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.orm-input-group input:focus {
    border-color: var(--na-accent-cyan, #3daa8a);
}

.orm-input-group select {
    background: var(--na-bg-calc-input, #22222c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8fa0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid #2a2a36;
    color: #dce2ea;
    padding: 10px 12px;
    padding-right: 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    min-width: 60px;
    -webkit-appearance: none;
    appearance: none;
}

.orm-stepper {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a2a36;
}

.orm-stepper input[type="number"] {
    flex: 1;
    background: var(--na-bg-calc-input, #22222c);
    border: none;
    border-left: 1px solid #2a2a36;
    border-right: 1px solid #2a2a36;
    color: #dce2ea;
    padding: 10px 4px;
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
    min-width: 0;
}

.orm-stepper input::-webkit-outer-spin-button,
.orm-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.orm-stepper-btn {
    background: var(--na-bg-calc-hover, #1e1e28);
    border: none;
    color: #dce2ea;
    padding: 0 14px;
    font-size: 1.4rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.orm-stepper-btn:hover { background: #2a2a36; color: #dce2ea; }
.orm-stepper-btn:active { background: var(--na-accent-cyan, #3daa8a); color: #fff; }

.orm-clear-btn {
    width: 100%;
    background: var(--na-bg-calc-section, #1a1a22);
    border: none;
    color: #dce2ea;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.orm-clear-btn:hover { color: #dce2ea; background: #22222c; }

.orm-result {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.orm-result-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5a5f6e;
    margin-bottom: 8px;
}

.orm-result-value {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--na-accent-cyan, #3daa8a);
    line-height: 1;
    margin-bottom: 4px;
}

.orm-result-source { font-size: 0.75rem; color: #5a5f6e; margin-top: 8px; }
.orm-result-warning { font-size: 0.75rem; color: #c9944a; margin-top: 8px; font-style: italic; }

.orm-formula-section { margin-bottom: 16px; }

.orm-formula-summary {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--na-bg-calc-section, #1a1a22);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.orm-formula-summary:hover { background: #1e1e28; }

.orm-formula-summary-value { font-size: 0.85rem; font-weight: 600; color: #dce2ea; margin-right: 8px; }
.orm-formula-summary-weight { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: #dce2ea; text-align: right; }
.orm-formula-expand { width: 14px; height: 10px; margin-left: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238a8fa0' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.2s; flex-shrink: 0; }
.orm-formula-expand.open { transform: rotate(180deg); }

.orm-formula-detail { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.orm-formula-detail.open { max-height: 400px; }

.orm-formula-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.85rem; }
.orm-formula-table tbody tr { cursor: pointer; transition: background 0.15s; border-left: 2px solid transparent; }
.orm-formula-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.orm-formula-table tbody tr.selected { background: rgba(255, 255, 255, 0.04); border-left: 2px solid var(--na-accent-cyan, #3daa8a); }
.orm-formula-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--na-bg-calc-section, #1a1a22); }
.orm-formula-table tbody td:first-child { font-style: italic; }
.orm-formula-table tbody td:last-child { font-weight: 600; text-align: right; }

/* Formula Tooltip */
#orm-tooltip { position: fixed; background: #1a1a22; border: 1px solid #2a2a36; border-radius: 8px; padding: 12px 16px; white-space: nowrap; z-index: 1000; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); display: none; }
#orm-tooltip.visible { display: block; }
#orm-tooltip .orm-tt-label { font-size: 0.65rem; color: #5a5f6e; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
#orm-tooltip .orm-tt-formula { font-family: 'Times New Roman', 'Georgia', serif; font-size: 1.1rem; font-style: italic; color: #dce2ea; letter-spacing: 0.02em; margin-bottom: 6px; }
#orm-tooltip .orm-tt-calc { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.75rem; color: var(--na-accent-cyan, #3daa8a); letter-spacing: 0.03em; }

.orm-pct-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.85rem; }
.orm-pct-table thead th { text-align: left; padding: 8px 12px; color: #5a5f6e; font-weight: 500; font-size: var(--na-font-table-header, 0.8rem); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--na-bg-calc-hover, #1e1e28); }
.orm-pct-table thead th:last-child, .orm-pct-table tbody td:last-child { text-align: right; }
.orm-pct-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--na-bg-calc-section, #1a1a22); }
.orm-pct-table tbody td:nth-child(2) { font-weight: 600; }
.orm-pct-table tbody tr:first-child td { color: var(--na-accent-cyan, #3daa8a); font-weight: 600; }

.orm-more-tools { text-align: center; padding: 20px 0 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 24px; }
.orm-more-tools p { color: #5a5f6e; font-size: var(--na-font-more-tools, 0.75rem); margin: 0; white-space: nowrap; overflow-x: auto; }
.orm-more-tools a { color: #8a8f9e; text-decoration: none; transition: color 0.2s; }
.orm-more-tools a:hover { color: var(--na-accent-cyan, #3daa8a); }

/* Light Mode */
@media (prefers-color-scheme: light) {
    body.page-template-orm-calculator, body.page-template-orm-calculator-de, body.page-template-orm-calculator-fr { background: #f5f5f5; }
    .orm-wrapper { background: #f5f5f5; }
    #orm-app { background: #fafafa; color: #1a1a1a; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    .orm-info-block { background: #f0f0f0; }
    .orm-header:hover { background: #e8e8e8; }
    .orm-title { color: #1a1a1a; }
    #orm-info-content { background: transparent; }
    #orm-info-content > div { color: #555; }
    #orm-info-content h2 { color: #1a1a1a; }
    .orm-answer-first { color: #666; }
    .orm-input-section { background: #f0f0f0; }
    .orm-input-section label { color: #666; }
    .orm-input-group input[type="number"] { background: #fff; color: #1a1a1a; border: 1px solid #e0e0e0; }
    .orm-input-group select { background: #fff; color: #1a1a1a; border: 1px solid #e0e0e0; }
    .orm-stepper { border-color: #e0e0e0; }
    .orm-stepper input[type="number"] { background: #fff; color: #1a1a1a; border-color: #e0e0e0; }
    .orm-stepper-btn { background: #f0f0f0; color: #1a1a1a; }
    .orm-stepper-btn:hover { background: #e0e0e0; }
    .orm-clear-btn { background: #f0f0f0; color: #1a1a1a; }
    .orm-clear-btn:hover { background: #e0e0e0; }
    .orm-result { border-color: rgba(0,0,0,0.08); }
    .orm-result-label { color: #666; }
    .orm-result-value { color: #2d8a6e; }
    .orm-result-source { color: #999; }
    .orm-formula-summary { background: #f0f0f0; }
    .orm-formula-summary:hover { background: #e8e8e8; }
    .orm-formula-summary-value { color: #1a1a1a; }
    .orm-formula-summary-weight { color: #1a1a1a; }
    .orm-formula-table tbody td { border-bottom-color: #f0f0f0; color: #1a1a1a; }
    .orm-formula-table tbody tr:hover { background: rgba(0,0,0,0.02); }
    .orm-formula-table tbody tr.selected { background: rgba(0,0,0,0.04); border-left-color: #2d8a6e; }
    .orm-pct-table thead th { color: #999; border-bottom-color: #eee; }
    .orm-pct-table tbody td { border-bottom-color: #f0f0f0; color: #1a1a1a; }
    .orm-pct-table tbody tr:first-child td { color: #2d8a6e; }
    .orm-more-tools { border-top-color: rgba(0,0,0,0.08); }
    .orm-more-tools p { color: #999; }
    .orm-more-tools a { color: #666; }
    #orm-tooltip { background: #fff; border-color: #e0e0e0; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
    #orm-tooltip .orm-tt-formula { color: #1a1a1a; }
    #orm-tooltip .orm-tt-calc { color: #2d8a6e; }
}

/* Print */
@media print {
    .orm-wrapper { padding: 20px; padding-top: 20px; }
    .orm-clear-btn, .orm-more-tools, .orm-formula-section { display: none; }
    .orm-result-value { color: #000; }
}

/* Mobile */
@media (max-width: 768px) {
    .orm-wrapper { padding: 16px 8px; padding-top: calc(var(--na-navbar-height, 70px) + 16px); }
    #orm-app { padding: 12px 16px 20px 16px; font-size: 1.05rem; }
    .orm-title { font-size: 1.4rem; }
    .orm-result-value { font-size: 2.4rem; }
    .orm-input-section label { font-size: 0.8rem; }
    .orm-stepper-btn { padding: 0 10px; font-size: 1.3rem; }
    .orm-input-group input[type="number"] { font-size: 1.2rem; padding: 12px 16px; }
    .orm-input-group select { font-size: 1rem; padding: 12px 14px; }
    .orm-formula-summary { padding: 14px 16px; }
    .orm-formula-summary-value { font-size: 1rem; }
    .orm-formula-summary-weight { font-size: 1rem; }
    .orm-formula-table { font-size: 1rem; }
    .orm-formula-table tbody td { padding: 12px 14px; }
    .orm-pct-table { font-size: 1rem; }
    .orm-pct-table thead th { font-size: 0.75rem; }
    .orm-pct-table tbody td { padding: 10px 14px; }
    .orm-clear-btn { font-size: 0.85rem; padding: 14px; }
    .orm-more-tools p { font-size: 0.85rem; }
}
