/**
 * Modern Multi-Step Calculator Styles
 */

:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error: #ef4444;
    --accent-blue: #0ea5e9;
    --accent-orange: #f97316;
}

* {
    box-sizing: border-box;
}

.peptide-calculator-app-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 1366px;
    margin: 0 auto;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    padding: 40px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Progress Bar */
.progress-header {
    margin-bottom: 36px;
    display: block;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 33%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

/* Step Management */
.calc-step {
    display: none;
}

.calc-step.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Typography */
.peptide-calculator-app-container h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

.peptide-calculator-app-container h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--text);
}

/* Forms */
.calc-field {
    margin-bottom: 24px;
}

.calc-field label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.calc-field input {
    width: 100%;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 1.05rem;
    outline: none;
    transition: all 0.2s;
    background: #fdfdfd;
}

.calc-field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.error-msg {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.error-msg.show {
    display: block;
}

.selector {
    display: flex;
    gap: 12px;
}

.option {
    flex: 1;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    background: #fdfdfd;
}

.option.active {
    border-color: var(--primary);
    background-color: #f0fdf4;
    color: var(--primary-dark);
    box-shadow: 0 0 0 1px var(--primary);
}

.option:hover {
    border-color: var(--primary);
    background: #f0fdf4;
}

/* Protocol Cards */
.protocol-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.card-protocol {
    position: relative;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
}

.card-protocol:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.card-protocol.active {
    border-color: var(--primary);
    background-color: #f0fdf4;
    box-shadow: 0 0 0 1px var(--primary);
}

.tag {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    position: absolute;
    top: -10px;
    left: 16px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tag-popular {
    background: #dcfce7;
    color: #15803d;
}

.tag-speed {
    background: #fee2e2;
    color: #b91c1c;
}

.tag-gentle {
    background: #e0f2fe;
    color: #0369a1;
}

.tag-max {
    background: #fef3c7;
    color: #92400e;
}

.tag-rec {
    background: var(--primary);
    color: white;
    right: 16px;
    left: auto;
}

/* Result Section */
.res-summary {
    text-align: center;
    padding: 32px 24px;
    background: #f0fdf4;
    border-radius: 24px;
    margin-bottom: 32px;
}

.profile-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.res-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
    margin: 12px 0;
    letter-spacing: -0.04em;
}

/* Timeline Chart */
.chart-wrap {
    margin-bottom: 40px;
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
}

#progressChart {
    width: 100% !important;
    height: 160px !important;
    display: block;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 12px;
}

/* Bundles */
.bundle-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.bundle {
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    transition: all 0.2s;
    background: var(--card-bg);
}

.bundle.featured {
    border-color: var(--primary);
    background: #f0fdf4;
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.bundle-tag {
    position: absolute;
    top: -12px;
    right: 24px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    text-transform: uppercase;
}

.tag-featured {
    background: var(--primary);
}

.tag-best-value {
    background: var(--accent-blue);
}

.bundle-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.bundle-name {
    font-weight: 800;
    font-size: 1.2rem;
}

.bundle-price {
    font-weight: 900;
    font-size: 1.4rem;
}

.bundle-save {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
}

.bundle-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Common Buttons */
.btn-main {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.btn-main:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.2);
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 8px 14px;
    border-radius: 20px;
}

.btn-ghost {
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
    cursor: pointer;
    border-radius: 14px;
    font-weight: 700;
    padding: 14px;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-ghost:hover {
    border-color: var(--text);
    color: var(--text);
}

.lead-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--text-muted);
}

.lead-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.summary-notification {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    padding: 20px;
    margin-top: 32px;
    font-size: 0.9rem;
    animation: fadeIn 0.4s;
}

/* Recommended Products Section */
.recommended-products-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.recommended-products-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: left;
    color: var(--text);
}

.recommended-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommended-product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: var(--card-bg);
    transition: all 0.2s;
}

.recommended-product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.recommended-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recommended-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recommended-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.recommended-product-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.recommended-product-buy {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.recommended-product-buy:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Tablet Adjustments */
@media (max-width: 768px) {
    .peptide-calculator-app-container {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .peptide-calculator-app-container h1 {
        font-size: 1.5rem;
    }

    .peptide-calculator-app-container h2 {
        font-size: 1.3rem;
    }

    .calc-field label {
        font-size: 0.9rem;
    }

    .calc-field input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .btn-main {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .selector {
        flex-wrap: wrap;
    }

    .bundle {
        padding: 20px;
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .peptide-calculator-app-container {
        padding: 20px 16px;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    .peptide-calculator-app-container h1 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    .peptide-calculator-app-container h2 {
        font-size: 1.15rem;
        margin-bottom: 16px;
    }

    .calc-field {
        margin-bottom: 18px;
    }

    .calc-field label {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .calc-field input {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .option {
        padding: 12px 10px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .btn-main {
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .btn-back {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .progress-label {
        font-size: 0.7rem;
    }

    .card-protocol {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .protocol-name {
        font-size: 0.95rem;
    }

    .protocol-efficiency {
        font-size: 0.8rem;
    }

    .tag {
        font-size: 0.55rem;
        padding: 3px 8px;
    }

    .res-value {
        font-size: 2.8rem;
    }

    .res-pre, .res-post {
        font-size: 0.85rem;
    }

    .bundle {
        padding: 18px;
        border-radius: 12px;
    }

    .bundle-name {
        font-size: 1rem;
    }

    .bundle-price {
        font-size: 1.3rem;
    }

    .bundle-desc {
        font-size: 0.85rem;
    }

    .bundle-save {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .recommended-product-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .recommended-product-image {
        width: 100%;
        height: 120px;
    }

    .recommended-product-name {
        font-size: 0.95rem;
    }

    .recommended-product-price {
        font-size: 1rem;
    }

    .recommended-product-buy {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    .lead-check {
        font-size: 0.85rem;
    }

    .trust-badges {
        flex-wrap: wrap;
        gap: 8px;
    }

    .trust-badge {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}