/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.unit-toggle {
    display: flex;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
}

.unit-btn {
    flex: 1;
    padding: 10px 20px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.unit-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.unit-btn:hover:not(.active) {
    background-color: #1a1a1a;
    color: #e5e7eb;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.text-input[type="number"]::-webkit-inner-spin-button,
.text-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-input[type="number"] {
    -moz-appearance: textfield;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit .text-input {
    padding-right: 56px;
}

.input-unit {
    position: absolute;
    right: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
}

.imperial-height-row {
    display: flex;
    gap: 12px;
}

.imperial-height-row .input-with-unit {
    flex: 1;
}

.input-error {
    font-size: 13px;
    color: #f87171;
    padding: 4px 0;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    flex: 1;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-danger {
    border-color: #dc2626;
    color: #f87171;
}

.button-danger:hover {
    background-color: #7f1d1d;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmi-result-card {
    text-align: center;
    padding: 32px 24px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
}

.bmi-result-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.bmi-result-value {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 8px;
}

.bmi-result-category {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
    background-color: #1a1a1a;
    color: #e5e7eb;
}

.bmi-result-category.cat-underweight {
    background-color: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.bmi-result-category.cat-normal {
    background-color: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.bmi-result-category.cat-overweight {
    background-color: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.bmi-result-category.cat-obese1 {
    background-color: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.bmi-result-category.cat-obese2 {
    background-color: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.bmi-result-category.cat-obese3 {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.bmi-note {
    font-size: 13px;
    color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 6px;
    padding: 10px 14px;
}

.bmi-scale-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bmi-scale-header {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmi-scale {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bmi-scale-bar {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.scale-segment {
    height: 100%;
}

.scale-underweight {
    flex: 3.5;
    background-color: #60a5fa;
}

.scale-normal {
    flex: 6.4;
    background-color: #34d399;
}

.scale-overweight {
    flex: 5;
}

.scale-obese1 {
    flex: 5;
}

.scale-obese2 {
    flex: 5;
}

.scale-obese3 {
    flex: 5;
    background-color: #ef4444;
}

.scale-marker {
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ffffff;
    transform: translateX(-8px);
    transition: left 300ms ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.bmi-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    padding: 0 2px;
}

.bmi-scale-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.scale-cat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-underweight {
    background-color: #60a5fa;
}

.cat-normal {
    background-color: #34d399;
}

.cat-overweight {
}

.cat-obese1 {
}

.cat-obese2 {
}

.cat-obese3 {
    background-color: #ef4444;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 16px 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.copy-action {
    display: flex;
}

.copy-action .button-secondary {
    width: 100%;
}

.disclaimer {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    padding: 12px 0;
    border-top: 1px solid #2a2a2a;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

.pro-feature-block {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.pro-feature-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pro-feature-content {
    padding: 20px;
}

.pro-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: #141414;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 150ms ease;
    font-size: 14px;
    color: #9ca3af;
}

.pro-locked:hover {
    background-color: #1a1a1a;
}

.lock-icon {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background-color: #2a2a2a;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ideal-weight-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px;
    background-color: #141414;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ideal-weight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ideal-weight-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ideal-weight-value {
    font-size: 24px;
    font-weight: 700;
    color: #34d399;
}

.ideal-weight-separator {
    font-size: 14px;
    color: #6b7280;
}

.ideal-weight-note {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.body-fat-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.body-fat-inputs .input-group {
    gap: 8px;
}

.body-fat-inputs .button-secondary {
    width: 100%;
}

.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #374151;
    border-radius: 50%;
    position: relative;
    transition: border-color 150ms ease;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #3b82f6;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.body-fat-result {
    margin-top: 16px;
    padding: 16px;
    background-color: #141414;
    border-radius: 8px;
}

.body-fat-value-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.body-fat-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.body-fat-value {
    font-size: 24px;
    font-weight: 700;
    color: #60a5fa;
}

.body-fat-note {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.body-fat-minor-note {
    font-size: 12px;
    color: #fbbf24;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(251, 191, 36, 0.08);
    border-radius: 4px;
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 24px;
    color: #6b7280;
    font-size: 14px;
}

.history-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: background-color 150ms ease;
}

.history-entry:hover {
    background-color: #1a1a1a;
}

.history-entry-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.history-entry-date {
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

.history-entry-bmi {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    flex-shrink: 0;
}

.history-entry-category {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.history-entry-delete {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.history-entry-delete:hover {
    color: #ef4444;
}

.print-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.print-description {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

.print-content .button-secondary {
    width: 100%;
}

.print-report {
    display: none;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    animation: toast-in 300ms ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.confirm-actions .button-secondary,
.confirm-actions .button-primary {
    flex: 1;
}

.confirm-actions .button-danger {
    background-color: #dc2626;
    border: none;
    color: #ffffff;
}

.confirm-actions .button-danger:hover {
    background-color: #b91c1c;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .bmi-result-card {
        padding: 24px 16px;
    }

    .bmi-result-value {
        font-size: 2.5rem;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-card-value {
        font-size: 14px;
    }

    .bmi-scale-categories {
        gap: 8px;
    }

    .scale-cat {
        font-size: 11px;
    }

    .ideal-weight-display {
        gap: 12px;
        padding: 12px;
    }

    .ideal-weight-value {
        font-size: 20px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .button-primary,
    .action-buttons .button-secondary {
        width: 100%;
    }

    .history-entry-info {
        gap: 8px;
    }

    .history-entry-date {
        font-size: 12px;
    }

    .pro-feature-header {
        padding: 12px 16px;
    }

    .pro-feature-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .imperial-height-row {
        flex-direction: column;
        gap: 8px;
    }

    .radio-group {
        gap: 16px;
    }

    .confirm-actions {
        flex-direction: column;
    }
}

@media print {
    body {
        color: #111111;
    }

    .nav,
    .hero,
    .input-section,
    .output-section,
    .pro-cta-bar,
    .footer,
    .toast,
    .modal-overlay {
        display: none !important;
    }

    .print-report {
        display: block !important;
        padding: 40px;
        max-width: 700px;
        margin: 0 auto;
    }

    .print-report h2 {
        font-size: 24px;
        font-weight: 700;
        color: #111111;
        margin-bottom: 8px;
    }

    .print-date {
        font-size: 14px;
        color: #666666;
        margin-bottom: 32px;
    }

    .print-section-block {
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e5e5;
    }

    .print-section-block h3 {
        font-size: 16px;
        font-weight: 600;
        color: #111111;
        margin-bottom: 8px;
    }

    .print-section-block p {
        font-size: 14px;
        color: #333333;
        line-height: 1.6;
    }

    .print-disclaimer {
        font-size: 12px;
        color: #999999;
        line-height: 1.5;
        margin-top: 32px;
        padding-top: 16px;
        border-top: 1px solid #e5e5e5;
    }
}