/* assets/css/calculator.css */

.mmol-calc-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    max-width: 800px;
    margin: 40px auto;
}

.mmol-calc-header {
    margin-bottom: 32px;
}

.mmol-calc-h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 auto 24px auto;
    max-width: 800px;
    letter-spacing: -0.025em;
    text-align: center;
}

.mmol-calc-h1 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.mmol-calc-intro-text {
    font-size: 16px;
    color: #475569;
    margin-bottom: 8px;
    line-height: 1.6;
}

.mmol-calc-intro-text-highlight {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 24px;
}

.mmol-calc-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

.mmol-calc-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.mmol-calc-subtitle {
    font-size: 15px;
    color: #475569;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.mmol-calc-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #0f172a;
}

.mmol-calc-settings {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 8px;
}

@media (max-width: 550px) {
    .mmol-calc-settings {
        grid-template-columns: 1fr;
    }
}

.mmol-calc-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mmol-calc-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mmol-calc-analyte-subtext {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

.mmol-calc-readonly-analyte {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    background-color: #f8fafc;
    color: #1e293b;
    font-weight: 600;
}

.mmol-calc-toggle {
    display: flex;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.mmol-calc-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.mmol-calc-toggle button.active {
    background: #059669;
    color: #ffffff;
}

.mmol-calc-inputs {
    margin: 24px 0;
}

.mmol-calc-input-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mmol-calc-field {
    flex: 1;
}

.mmol-calc-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

.mmol-calc-arrow {
    font-size: 24px;
    color: #94a3b8;
    margin-top: 24px;
}

.mmol-calc-result-box {
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #047857;
    min-height: 54px;
    display: flex;
    align-items: center;
}

.mmol-calc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.mmol-calc-info-box {
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    flex: 1;
}

.mmol-calc-btn-clear {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* Dynamic Breakdown Section - Matching Screenshot 2 */
.mmol-calc-breakdown-section {
    margin-bottom: 32px;
}

.mmol-calc-breakdown-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid #059669;
}

.mmol-calc-step {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.mmol-calc-step-num {
    background: #047857;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.mmol-calc-step-body {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    font-weight: 500;
}

.mmol-calc-math-font {
    font-family: "Courier New", Courier, monospace;
    background: #f0fdf4;
    padding: 2px 6px;
    border-radius: 4px;
    color: #059669;
    font-weight: 700;
}

/* Nearby Table Section - Professional Look */
.mmol-calc-nearby-section {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.mmol-calc-nearby-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #0f172a;
}

.mmol-calc-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
    font-weight: 800;
    color: #059669;
    text-transform: uppercase;
    border-bottom: 2px solid #ecfdf5;
    padding-bottom: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.mmol-calc-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    color: #475569;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s;
}

.mmol-calc-table-row:hover {
    background: #fdfdfd;
}

.mmol-calc-table-row:last-child {
    border-bottom: none;
}

.mmol-calc-table-row span:last-child {
    font-weight: 700;
    color: #0f172a;
}

/* Extra Content Sections (Inner Pages) */
.mmol-calc-extra-content>div {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
}

.mmol-calc-extra-content h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
}

.mmol-calc-formula-section p {
    font-size: 14px;
    margin-bottom: 12px;
}

.mmol-calc-formula-section ol {
    margin-left: 20px;
    font-size: 14px;
    color: #475569;
}

.mmol-calc-formula-section li {
    margin-bottom: 8px;
}

.mmol-calc-notes-section {
    background: #fffbeb !important;
    border-color: #fef3c7 !important;
}

.mmol-calc-notes-section h3 {
    color: #92400e;
}

.mmol-calc-notes-section ul {
    margin-left: 20px;
    font-size: 14px;
    color: #92400e;
}

.mmol-calc-notes-section li {
    margin-bottom: 8px;
}

.mmol-calc-faq-item {
    border-top: 1px solid #f1f5f9;
    padding: 16px 0;
}

.mmol-calc-faq-item:first-of-type {
    border-top: none;
}

.mmol-calc-faq-q {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.mmol-calc-faq-a {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}