/* ============================================
   HENX3D - Calculator Styles
   ============================================ */

/* Progress Steps */
.calc-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.calc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

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

.calc-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    border: 2px solid var(--line);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.calc-step.active .calc-step-number {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-color: transparent;
    color: var(--bg);
    box-shadow: 0 0 20px rgba(103, 232, 249, 0.3);
}

.calc-step.completed .calc-step-number {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.calc-step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.calc-step.active .calc-step-label {
    color: var(--text);
}

.calc-step-connector {
    flex-shrink: 0;
    width: 80px;
    height: 2px;
    background: var(--line);
    margin: 0 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .calc-progress {
        flex-direction: column;
        gap: 1rem;
    }

    .calc-step-connector {
        width: 2px;
        height: 30px;
        margin: 0;
    }

    .calc-step-label {
        display: none;
    }
}

/* Calculator Container */
.calc-container {
    max-width: 900px;
    margin: 0 auto;
}

.calc-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.calc-panel.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-panel-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
}

/* Upload Section */
.calc-upload-section {
    margin-bottom: 2rem;
}

.calc-upload-box {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 2px dashed var(--line);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calc-upload-box:hover,
.calc-upload-box.drag-over {
    border-color: var(--glow);
    background: linear-gradient(180deg, rgba(103,232,249,.08), rgba(103,232,249,.02));
}

.calc-upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.calc-upload-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.calc-upload-box p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.calc-file-info {
    background: linear-gradient(180deg, rgba(0,229,255,.08), rgba(0,229,255,.02));
    border: 1px solid var(--glow);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.calc-file-info .calc-upload-icon {
    color: var(--secondary);
    font-size: 2.5rem;
}

.calc-file-info h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.calc-file-info p {
    color: var(--muted);
    margin-bottom: 1rem;
}

/* Divider */
.calc-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.calc-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
}

.calc-divider span {
    position: relative;
    background: var(--bg);
    padding: 0 1rem;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form Sections */
.calc-form-section {
    margin-bottom: 3rem;
}

.calc-form-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.calc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

/* Material Grid */
.calc-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.calc-material-category {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
}

.calc-material-category:first-child {
    margin-top: 0;
}

.calc-material-category h4 {
    font-size: 1rem;
    color: var(--glow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Material Cards */
.calc-material-card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-material-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103,232,249,.25);
    box-shadow: 0 4px 12px rgba(103,232,249,.15);
}

.calc-material-card.active {
    border-color: var(--glow);
    background: linear-gradient(180deg, rgba(103,232,249,.1), rgba(103,232,249,.02));
    box-shadow: 0 0 0 2px rgba(103,232,249,.2);
}

.calc-material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.calc-material-header h4 {
    font-size: 1.125rem;
    color: var(--text);
    margin: 0;
}

.calc-material-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--glow);
}

.calc-material-description {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.calc-material-properties {
    margin-top: 0.75rem;
}

.calc-material-properties small {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Option Cards */
.calc-option-card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-option-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103,232,249,.25);
    box-shadow: 0 4px 12px rgba(103,232,249,.15);
}

.calc-option-card.active {
    border-color: var(--glow);
    background: linear-gradient(180deg, rgba(103,232,249,.1), rgba(103,232,249,.02));
    box-shadow: 0 0 0 2px rgba(103,232,249,.2);
}

.calc-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.calc-option-header h4 {
    font-size: 1.125rem;
    color: var(--text);
    margin: 0;
}

.calc-option-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--glow);
}

.calc-option-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg);
}

.calc-option-description {
    color: var(--text);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.calc-option-detail {
    color: var(--muted);
    font-size: 0.875rem;
    margin: 0;
}

.calc-option-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.calc-option-properties span {
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,.05);
    border-radius: 4px;
}

/* Quality Grid */
.calc-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

/* Shipping Grid */
.calc-shipping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Post-processing Grid */
.calc-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Price Summary */
.calc-price-summary {
    background: linear-gradient(180deg, rgba(0,229,255,.08), rgba(0,229,255,.02));
    border: 1px solid var(--glow);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
}

.calc-price-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.calc-price-breakdown {
    background: rgba(0,0,0,.2);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.calc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: var(--text);
}

.calc-price-row span:first-child {
    color: var(--muted);
}

.calc-price-row span:last-child {
    font-weight: 700;
    font-size: 1rem;
}

.calc-price-positive {
    color: var(--secondary) !important;
}

.calc-price-divider {
    height: 1px;
    background: var(--line);
    margin: 0.5rem 0;
}

.calc-price-subtotal {
    font-size: 1.125rem;
    padding-top: 1rem;
}

.calc-price-total {
    font-size: 1.5rem;
    padding-top: 1rem;
}

.calc-price-total span:last-child {
    color: var(--glow);
    font-size: 2rem;
}

.calc-price-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.calc-price-info p {
    margin-bottom: 0.75rem;
    color: var(--text);
}

.calc-price-info span {
    color: var(--glow);
    font-weight: 600;
}

.calc-price-note {
    font-size: 0.875rem;
    color: var(--muted) !important;
    font-style: italic;
    margin-top: 1rem;
}

/* Actions */
.calc-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .calc-panel-title {
        font-size: 1.5rem;
    }

    .calc-form-grid {
        grid-template-columns: 1fr;
    }

    .calc-material-grid,
    .calc-quality-grid,
    .calc-shipping-grid,
    .calc-option-grid {
        grid-template-columns: 1fr;
    }

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

    .calc-actions .btn {
        width: 100%;
    }

    .calc-price-summary {
        padding: 1.5rem;
    }

    .calc-price-breakdown {
        padding: 1rem;
    }

    .calc-price-total {
        font-size: 1.25rem;
    }

    .calc-price-total span:last-child {
        font-size: 1.5rem;
    }
}
