:root {
    /* Brand Palette - Industrial & Professional */
    --brand-teal: #4ABDAC;
    /* Primary Accent */
    --brand-orange: #FC4A1A;
    /* CTA / Highlight */
    --brand-dark: #444444;
    /* Text / Headings */
    --brand-gray: #777777;
    /* Secondary Text */
    --border-color: #E0E0E0;
    /* Light borders */
    --bg-light: #F9F9F9;
    /* Card backgrounds */
    --bg-white: #FFFFFF;

    /* Spacing & Layout */
    --radius-sm: 8px;
    /* Increased for rounded look */
    --radius-md: 12px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    /* Clean, Flat Shadows (Minimal) */
    --shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f4f4f4;
    color: var(--brand-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    background: var(--bg-white);
    width: 100%;
    max-width: 700px;
    /* Slightly wider for a "section" feel */
    border: 1px solid #ddd;
    /* Subtle border instead of shadow */
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: auto;
    /* Allow height to fit content to reduce gap */
}

/* Header - Simple & clean */
.app-header {
    padding: var(--spacing-md) var(--spacing-md) 0;
    background: var(--bg-white);
    border-bottom: 1px solid transparent;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo i {
    color: var(--brand-teal);
}

/* Progress Bar - Minimalist Line */
.progress-track {
    position: relative;
    height: 3px;
    background: #EEEEEE;
    margin-top: 1rem;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--brand-teal);
    width: 0%;
    transition: width var(--transition);
}

.steps-indicator {
    display: none;
    /* Remove dots for cleaner look */
}

/* Wizard Content */
.wizard-container {
    /* flex: 1; Removed to prevent pushing footer down unnecessarily */
    position: relative;
    overflow: hidden;
    padding: var(--spacing-lg) var(--spacing-md);
}

.step-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--brand-dark);
}

.step-header p {
    color: var(--brand-gray);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 400;
}

/* Form Elements */
.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.premium-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-white);
    color: var(--brand-dark);
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23444444%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
}

.premium-select:focus {
    border-color: var(--brand-teal);
}

/* Grids */
.grid-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .grid-options {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        /* Auto fit for single row if space allows */
    }

    .grid-options-3-md {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .grid-options {
        grid-template-columns: repeat(4, 1fr);
        /* Force 4 columns on larger screens for roof type */
    }
}

/* Flat Selection & Image Cards */
.selection-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0;
    /* Remove padding to let image flush if wanted, or keep small */
    text-align: center;
    /* Centered text */
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Text-only container inside card */
.selection-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem;
    color: var(--brand-dark);
}

.selection-card p {
    font-size: 0.85rem;
    color: var(--brand-gray);
    margin: 0 1rem 1rem;
}

.card-image {
    height: 100px;
    /* Reduced from 140px for desktop too */
    width: 100%;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    .card-image {
        height: 70px;
        /* Further reduced for mobile */
    }
}

/* Hover state */
.selection-card:hover {
    border-color: var(--brand-dark);
    /* Darker border on hover */
    background: #fafafa;
}

/* Selected State */
.selection-card.selected {
    border-color: var(--brand-teal);
    background: #F0FFFC;
    /* Very subtle teal tint */
}

/* Optional "Tick" overlay for selected state */
.selection-card.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--brand-teal);
    pointer-events: none;
    border-radius: var(--radius-sm);
}

/* Checkbox Cards (Transport/Montaj) */
.checkbox-card {
    display: block;
    cursor: pointer;
    margin-bottom: 1rem;
}

.checkbox-card input {
    display: none;
}

.checkbox-card .card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    background: var(--bg-white);
}

.checkbox-card:hover .card-content {
    border-color: var(--brand-dark);
}

.checkbox-card input:checked+.card-content {
    border-color: var(--brand-teal);
    background: #F0FFFC;
}

.checkbox-card .icon-box {
    color: var(--brand-gray);
    display: flex;
    align-items: center;
}

.checkbox-card input:checked+.card-content .icon-box {
    color: var(--brand-teal);
}

.check-circle {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    margin-left: auto;
    position: relative;
    /* Strict Circle Reinforcement */
    flex: 0 0 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

.checkbox-card input:checked+.card-content .check-circle {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
}

/* Custom adjust for Transport Icon: Size & Color */
#optTransport+.card-content .icon-box svg {
    width: 50px;
    height: auto;
    stroke-width: 0.87px;
    /* Increase by 15% from 0.75px */
}

#optTransport:checked+.card-content .icon-box {
    color: var(--brand-gray);
}

/* Big Inputs for Surface */
.big-input-wrapper {
    position: relative;
}

.big-input-wrapper input {
    width: 100%;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1rem;
    padding-right: 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--brand-dark);
}

.big-input-wrapper input:focus {
    border-color: var(--brand-teal);
}

.big-input-wrapper .unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-gray);
    font-weight: 500;
}

/* Footer Navigation */
.app-footer {
    padding: 1rem var(--spacing-md) 1.5rem;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Ensure vertical alignment */
    gap: 1rem;
}

button {
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

.btn-primary {
    background: var(--brand-orange);
    color: white;
    border: none;
    padding: 0 2rem !important;
    height: 52px !important;
    min-height: 52px !important;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.btn-primary:hover {
    background-color: #e34216;
}

.btn-secondary {
    background: #f8f8f8;
    color: var(--brand-gray);
    border: 1px solid var(--border-color);
    padding: 0 2rem !important;
    height: 52px !important;
    min-height: 52px !important;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--brand-dark);
    color: var(--brand-dark);
    background: #f0f0f0;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Results Screen */
.result-card {
    text-align: center;
}

.result-header {
    margin-bottom: 2rem;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--brand-teal);
    margin-bottom: 1rem;
}

.price-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1.5rem;
    vertical-align: top;
    color: var(--brand-gray);
}

.vat-note {
    color: var(--brand-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.breakdown {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    color: var(--brand-dark);
    font-size: 0.95rem;
}

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

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    align-items: stretch;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--brand-teal);
    color: var(--brand-teal);
    width: 100%;
    min-height: 52px;
    /* Fixed height for consistency */
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
}

.btn-outline svg,
.btn-outline i {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .btn-outline {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

.full-width {
    width: 100%;
}

/* Red Button Animation */
/* Red Button Animation */
/* Red Button Refinement */
/* Red Button Refinement */
.red-button {
    display: flex;
}

.red-button button.btn,
.red-button .btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 2rem !important;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    box-shadow: none !important;
    border-radius: var(--radius-sm);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.red-button .btn--primary {
    color: white !important;
    background: var(--brand-orange) !important;
}

.red-button .btn--animated {
    transition: color 0.2s, background-color 0.2s !important;
}

.red-button .btn--animated:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--brand-teal);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.5s ease-out;
    z-index: -1;
}

.red-button .btn--animated:hover {
    color: white !important;
}

.red-button .btn--animated:hover:before {
    transform: scaleX(1);
}

/* Mobile: Disable transitions, animations and hover effects on Mai Departe button below 768px */
@media screen and (max-width: 768px) {
    .red-button .btn--animated {
        transition: none !important;
        transform: none !important;
    }

    .red-button .btn--animated:before {
        display: none !important;
    }

    .red-button .btn--animated:hover,
    .red-button .btn--animated:focus,
    .red-button .btn--animated:active,
    .red-button .btn:active {
        background-color: var(--brand-orange) !important;
        color: white !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 1 !important;
    }

    /* Equal size footer buttons on mobile */
    .app-footer {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem 1rem 1.5rem;
    }

    .btn-secondary,
    .red-button {
        flex: 1 1 0;
        min-width: 0;
    }

    .btn-secondary,
    .red-button .btn {
        width: 100%;
        padding: 0 0.5rem !important;
        font-size: 0.85rem !important;
    }
}