/* Toolstrem BMI Calculator Stylesheet */
.bmi-calc-wrap {
    font-family: var(--font-sans);
    color: var(--text-main);
    padding: 2rem 0;
}

.bmi-calc-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Glassmorphism Cards */
.bmi-calc-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

/* Tabs switcher */
.calc-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    outline: none;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Form Styles */
.input-row {
    margin-bottom: 1.25rem;
}

.input-row label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.input-field-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 12px;
    transition: border-color 0.2s;
}

.input-field-wrap:focus-within {
    border-color: var(--primary);
}

.calc-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 8px 0;
    outline: none;
}

.input-suffix {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: 8px;
    flex-shrink: 0;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Two-column layout */
.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }
}

/* Results panel */
.results-panel {
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
    position: sticky;
    top: 24px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.result-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.bmi-value-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
}

.bmi-score {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.bmi-class {
    font-size: 1.15rem;
    font-weight: 800;
    margin-top: 4px;
}

/* Dynamic Gauge scale meter */
.gauge-container {
    margin: 1.5rem 0;
    position: relative;
}

.gauge-track {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, 
        #3b82f6 0%,    /* Underweight */
        #10b981 30%,   /* Normal */
        #f59e0b 55%,   /* Overweight */
        #f97316 75%,   /* Obesity I */
        #ef4444 90%,   /* Obesity II */
        #991b1b 100%   /* Obesity III */
    );
}

.gauge-needle {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 24px;
    background: var(--text-main);
    border: 1px solid var(--bg-surface);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Stats list */
.result-stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.result-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.result-stat-lbl {
    font-weight: 600;
    color: var(--text-muted);
}

.result-stat-val {
    font-weight: 700;
    color: var(--text-main);
}

/* Action button configurations */
.btn-calc-action {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    transition: all 0.25s;
    margin-top: 0.5rem;
}

.btn-calc-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-reset:hover {
    background: var(--border-color);
}

/* Details history block */
.history-card {
    background: var(--bg-surface-alt);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.history-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.btn-clear-history {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-clear-history:hover {
    color: #ef4444;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    border: 1px solid var(--border-color);
}

.history-meta-line {
    display: flex;
    flex-direction: column;
}

.history-filename {
    font-weight: 700;
    color: var(--text-main);
}

.history-stats {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-action-trigger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.history-action-trigger:hover {
    color: var(--border-focus);
}

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

/* Toast notifications */
.pg-toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface);
    border-left: 4px solid #ef4444;
    color: var(--text-main);
    padding: 14px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    font-weight: 600;
    font-size: 0.88rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
}

.pg-toast-notification.success {
    border-left-color: #10b981;
}

.pg-toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Disclaimer panel styling */
.disclaimer-banner {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 1.5rem;
}

.disclaimer-banner i {
    color: #f59e0b;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer-banner p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    font-weight: 550;
}

/* Print Specific Rules */
@media print {
    body * {
        visibility: hidden;
    }
    .results-panel, .results-panel * {
        visibility: visible;
    }
    .results-panel {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        background: #ffffff !important;
        color: #000000 !important;
    }
}
