/* Priskalkulator - Wizard Style */

:root {
    --primary: #0052CC;
    --primary-dark: #003D99;
    --primary-light: #4C9AFF;
    --primary-bg: rgba(0, 82, 204, 0.08);
    --secondary: #172B4D;
    --text: #172B4D;
    --text-light: #6B778C;
    --text-muted: #97A0AF;
    --background: #FFFFFF;
    --background-alt: #F4F5F7;
    --background-dark: #FAFBFC;
    --border: #DFE1E6;
    --border-light: #EBECF0;
    --success: #36B37E;
    --success-bg: rgba(54, 179, 126, 0.1);
    --warning: #FFAB00;
    --error: #FF5630;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background-alt);
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.progress-bar {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    background: var(--background-alt);
    transition: all 0.3s ease;
    cursor: default;
}

.step.active {
    background: var(--primary);
    color: white;
}

.step.completed {
    background: var(--success-bg);
    color: var(--success);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.step.active .step-number {
    background: rgba(255, 255, 255, 0.3);
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .step-label {
        display: none;
    }

    .step {
        padding: 8px;
    }
}

/* Wizard Container */
.wizard-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 40px 24px;
}

.wizard-step {
    display: none;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

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

.step-content {
    background: var(--background);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow);
}

/* Step Header */
.step-header {
    margin-bottom: 32px;
}

.step-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.hint {
    color: var(--text-light);
    font-size: 15px;
}

.question-counter {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--background-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-next {
    width: 100%;
    margin-top: 32px;
    padding: 16px 24px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Company List */
.company-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.company-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--background-alt);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.company-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.company-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2px;
}

.company-info span {
    font-size: 13px;
    color: var(--text-light);
}

.company-item .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Selected Company Badge */
.selected-company {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Form Fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.input-with-suffix {
    display: flex;
    align-items: stretch;
}

.input-with-suffix input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-with-suffix .suffix {
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: var(--background-alt);
    border: 2px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.input-hint {
    font-size: 13px;
    color: var(--text-muted);
}

/* Question Groups */
.question-group {
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.question-group label {
    display: block;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 12px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button-group.vertical {
    flex-direction: column;
}

.btn-option {
    padding: 12px 20px;
    background: var(--background-alt);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-option:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.btn-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button-group.vertical .btn-option {
    text-align: left;
}

/* Result Step */
.result-step .step-header {
    text-align: center;
}

.price-result {
    margin: 32px 0;
}

.price-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    color: white;
}

.price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

.price-amount .currency {
    font-size: 24px;
    font-weight: 600;
    opacity: 0.9;
}

.price-amount .amount {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.price-amount .period {
    font-size: 18px;
    opacity: 0.8;
}

.price-note {
    font-size: 13px;
    opacity: 0.8;
}

.price-disclaimer {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
}

/* Result Details */
.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .result-details {
        grid-template-columns: 1fr;
    }
}

.detail-card,
.company-summary {
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.detail-card h3,
.company-summary h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.detail-row,
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-row span:first-child,
.summary-row span:first-child {
    color: var(--text-light);
}

.detail-row span:last-child,
.summary-row span:last-child {
    font-weight: 500;
    color: var(--text);
}

.detail-row.subtotal {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 600;
}

.detail-row.multiplier span:last-child {
    color: var(--primary);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--background);
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .wizard-container {
        padding: 24px 16px;
    }

    .step-content {
        padding: 24px;
    }

    .step-header h2 {
        font-size: 20px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box .btn {
        width: 100%;
    }

    .price-amount .amount {
        font-size: 40px;
    }

    .button-group {
        flex-direction: column;
    }
}
