/* Bedriftspakker page styles */

/* Page Header */
.page-header {
    padding: calc(var(--space-xl) + 60px) 0 var(--space-lg);
    background: linear-gradient(135deg, var(--background) 0%, rgba(196, 169, 98, 0.08) 100%);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    transition: var(--transition-fast);
}

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

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--space-sm);
}

.page-header h1 span {
    color: var(--primary);
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
}

/* Builder Layout */
.builder {
    padding: var(--space-lg) 0 var(--space-xl);
}

.builder-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-lg);
    align-items: start;
}

/* Steps */
.builder-step {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.step-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.step-header h3 {
    font-size: 1.25rem;
}

.step-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* Guests Input */
.guests-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.guests-btn {
    width: 48px;
    height: 48px;
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
}

.guests-btn:hover {
    border-color: var(--primary);
    background: rgba(196, 169, 98, 0.1);
}

.guests-number {
    width: 100px;
    text-align: center;
    font-size: 2.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary);
    background: transparent;
    border: none;
    outline: none;
    -moz-appearance: textfield;
}

.guests-number::-webkit-inner-spin-button,
.guests-number::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Mat Options */
.mat-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.mat-option input {
    display: none;
}

.mat-card {
    background: var(--surface-elevated);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mat-card:hover {
    border-color: rgba(196, 169, 98, 0.3);
}

.mat-option input:checked + .mat-card {
    border-color: var(--primary);
    background: rgba(196, 169, 98, 0.08);
}

.mat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mat-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
}

.mat-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.mat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mat-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* Spill Options */
.spill-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.spill-option input {
    display: none;
}

.spill-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--surface-elevated);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.spill-card:hover {
    border-color: rgba(196, 169, 98, 0.3);
}

.spill-option input:checked + .spill-card {
    border-color: var(--primary);
    background: rgba(196, 169, 98, 0.08);
}

.spill-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.spill-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.spill-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.spill-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.spill-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.spill-check {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.spill-check svg {
    width: 18px;
    height: 18px;
    stroke: var(--secondary);
    opacity: 0;
    transition: var(--transition-fast);
}

.spill-option input:checked + .spill-card .spill-check {
    background: var(--primary);
    border-color: var(--primary);
}

.spill-option input:checked + .spill-card .spill-check svg {
    opacity: 1;
}

/* Tid Grid */
.tid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

/* Reuse form styles from main CSS */
.builder-step .form-group input,
.builder-step .form-group textarea,
.builder-step .form-group select {
    padding: 0.75rem 1rem;
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    width: 100%;
}

.builder-step .form-group input:focus,
.builder-step .form-group textarea:focus,
.builder-step .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.builder-step .form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.builder-step .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Summary Card */
.builder-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid rgba(196, 169, 98, 0.2);
    border-radius: 16px;
    padding: var(--space-md);
}

.summary-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: var(--space-md);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.summary-line span:first-child {
    color: var(--text-secondary);
}

.summary-line span:last-child {
    font-weight: 500;
}

.summary-total {
    padding: var(--space-sm) 0;
    border-top: 2px solid rgba(196, 169, 98, 0.3);
    margin-bottom: var(--space-md);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.total-row span:first-child {
    font-weight: 500;
}

.total-price {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.total-per-person {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.summary-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: var(--space-md);
    font-style: italic;
}

.summary-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.05rem;
}

.summary-contact {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.summary-contact a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.summary-contact a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .builder-grid {
        grid-template-columns: 1fr;
    }

    .builder-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 100;
        padding: 0;
    }

    .summary-card {
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
        padding: var(--space-sm) var(--space-md);
    }

    /* Collapse summary on mobile - show only total + button */
    .summary-card h3,
    .summary-lines,
    .summary-note,
    .summary-contact {
        display: none;
    }

    .summary-total {
        border-top: none;
        margin-bottom: 0;
        padding: 0;
    }

    .total-per-person {
        display: none;
    }

    .summary-card {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }

    .summary-total {
        flex: 1;
    }

    .total-row {
        margin-bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .total-row span:first-child {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .total-price {
        font-size: 1.5rem;
    }

    .summary-btn {
        width: auto;
        white-space: nowrap;
    }

    /* Add padding at bottom so content isn't hidden behind fixed summary */
    .builder {
        padding-bottom: 120px;
    }
}

@media (max-width: 768px) {
    .mat-options {
        grid-template-columns: 1fr;
    }

    .tid-grid {
        grid-template-columns: 1fr;
    }

    .spill-img {
        width: 56px;
        height: 56px;
    }
}
