/**
 * Phytopedia Dosage Calculator Styles
 * Clean, modern design matching Phytopedia brand
 *
 * @version 1.0.0
 */

/* ============================================
   Container & Layout
   ============================================ */

.phytopedia-calculator {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #424242;
}

/* ============================================
   Progress Bar
   ============================================ */

.calculator-progress {
    margin-bottom: 40px;
}

.progress-bar-container {
    height: 8px;
    background: #E8EAED;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--phytopedia-primary, #4CAF50), var(--phytopedia-secondary, #009688));
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.progress-step {
    flex: 1;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E8EAED;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--phytopedia-primary, #4CAF50);
    color: #ffffff;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--phytopedia-secondary, #009688);
    color: #ffffff;
}

.step-label {
    font-size: 12px;
    color: #6c757d;
}

.progress-step.active .step-label {
    color: #424242;
    font-weight: 600;
}

/* ============================================
   Step Content
   ============================================ */

.calculator-step-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    min-height: 400px;
}

.calculator-step h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #212121;
}

.step-description {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 32px 0;
}

/* ============================================
   Disclaimer Step
   ============================================ */

.disclaimer-content {
    max-width: 700px;
    margin: 0 auto;
}

.disclaimer-box {
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.disclaimer-box.warning {
    background: #FFF3CD;
    border-left: 4px solid #FFC107;
}

.disclaimer-box.info {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
}

.disclaimer-box.fda {
    background: #F5F5F5;
    border-left: 4px solid #9E9E9E;
    font-size: 14px;
}

.disclaimer-box h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #212121;
}

.disclaimer-box p {
    margin: 0;
    line-height: 1.6;
}

.disclaimer-box ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
    line-height: 1.8;
}

.disclaimer-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.disclaimer-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* ============================================
   Substance Step
   ============================================ */

.substance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.substance-card {
    padding: 24px;
    border: 2px solid #E8EAED;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.substance-card:hover {
    border-color: var(--phytopedia-primary, #4CAF50);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.substance-card.selected {
    border-color: var(--phytopedia-primary, #4CAF50);
    background: #E8F5E9;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.substance-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.substance-name {
    font-size: 16px;
    font-weight: 600;
    color: #424242;
}

/* ============================================
   Profile Step
   ============================================ */

.profile-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212121;
}

.weight-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weight-inputs input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.weight-inputs input:focus {
    outline: none;
    border-color: var(--phytopedia-primary, #4CAF50);
}

.weight-inputs span {
    color: #6c757d;
    font-weight: 600;
}

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

.experience-card,
.tolerance-card {
    padding: 16px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.experience-card:hover,
.tolerance-card:hover {
    border-color: var(--phytopedia-primary, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.experience-card.selected,
.tolerance-card.selected {
    border-color: var(--phytopedia-primary, #4CAF50);
    background: #E8F5E9;
}

.experience-name,
.tolerance-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #212121;
}

.experience-description,
.tolerance-description {
    font-size: 14px;
    color: #6c757d;
}

.safety-checks {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.safety-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
}

.safety-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ============================================
   Product Step
   ============================================ */

.product-form {
    max-width: 500px;
    margin: 0 auto;
}

.product-form input,
.product-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8EAED;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.product-form input:focus,
.product-form select:focus {
    outline: none;
    border-color: var(--phytopedia-primary, #4CAF50);
}

.product-form small {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #6c757d;
}

/* ============================================
   Method Step
   ============================================ */

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.method-card {
    padding: 24px;
    border: 2px solid #E8EAED;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-card:hover {
    border-color: var(--phytopedia-primary, #4CAF50);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.method-card.selected {
    border-color: var(--phytopedia-primary, #4CAF50);
    background: #E8F5E9;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.method-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.method-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #212121;
}

.method-timing {
    font-size: 14px;
    color: #6c757d;
}

.method-timing div {
    margin: 4px 0;
}

/* ============================================
   Results Step
   ============================================ */

.results-summary {
    max-width: 700px;
    margin: 0 auto;
}

.result-card.primary {
    background: linear-gradient(135deg, var(--phytopedia-primary, #4CAF50), var(--phytopedia-secondary, #009688));
    color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
}

.result-card.primary h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    opacity: 0.9;
}

.dose-amount {
    font-size: 64px;
    font-weight: 700;
    margin: 16px 0;
}

.dose-range {
    font-size: 18px;
    opacity: 0.9;
}

.result-details {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.detail-item {
    padding: 12px 0;
    border-bottom: 1px solid #E8EAED;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #212121;
}

.warnings-box {
    background: #FFF3CD;
    border-left: 4px solid #FFC107;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.warnings-box h4 {
    margin: 0 0 12px 0;
    color: #212121;
}

.warnings-box ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.safety-tips {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.safety-tips h4 {
    margin: 0 0 12px 0;
    color: #212121;
}

.safety-tips ul {
    margin: 0;
    padding-left: 20px;
    line-height: 2;
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-save-recommendation,
.btn-start-over {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-recommendation {
    background: var(--phytopedia-primary, #4CAF50);
    color: #ffffff;
}

.btn-save-recommendation:hover {
    background: var(--phytopedia-secondary, #009688);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-save-recommendation:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-save-recommendation:disabled:hover {
    background: var(--phytopedia-primary, #4CAF50);
    transform: none;
    box-shadow: none;
}

.btn-start-over {
    background: #f8f9fa;
    color: #424242;
    border: 2px solid #E8EAED;
}

.btn-start-over:hover {
    background: #E8EAED;
}

/* ============================================
   Navigation Buttons
   ============================================ */

.calculator-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.btn-nav {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back {
    background: #f8f9fa;
    color: #424242;
    border: 2px solid #E8EAED;
}

.btn-back:hover {
    background: #E8EAED;
}

.btn-next {
    background: var(--phytopedia-primary, #4CAF50);
    color: #ffffff;
    margin-left: auto;
}

.btn-next:hover {
    background: var(--phytopedia-secondary, #009688);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-next.disabled:hover {
    background: var(--phytopedia-primary, #4CAF50);
    box-shadow: none;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .calculator-step-content {
        padding: 24px;
    }

    .calculator-step h2 {
        font-size: 24px;
    }

    .substance-grid,
    .method-grid {
        grid-template-columns: 1fr;
    }

    .experience-grid,
    .tolerance-grid {
        grid-template-columns: 1fr;
    }

    .weight-inputs {
        flex-direction: column;
    }

    .weight-inputs span {
        display: none;
    }

    .progress-steps {
        flex-wrap: wrap;
    }

    .step-label {
        display: none;
    }

    .dose-amount {
        font-size: 48px;
    }

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

    .result-actions button {
        width: 100%;
    }
}

/* ============================================
   Loading State
   ============================================ */

.calculator-loading {
    text-align: center;
    padding: 60px 20px;
}

.calculator-loading p {
    font-size: 18px;
    color: #6c757d;
}
