/* ==========================================================================
   Webfonts
   ========================================================================== */

@font-face {
    font-family: 'Gotham Book';
    src: url('fonts/Gotham-Book.eot');
    src: url('fonts/Gotham-Book.eot?#iefix') format('embedded-opentype'),
         url('fonts/Gotham-Book.woff2') format('woff2'),
         url('fonts/Gotham-Book.woff') format('woff'),
         url('fonts/Gotham-Book.ttf') format('truetype'),
         url('fonts/Gotham-Book.svg#Gotham-Book') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham Bold';
    src: url('fonts/Gotham-Bold.eot');
    src: url('fonts/Gotham-Bold.eot?#iefix') format('embedded-opentype'),
         url('fonts/Gotham-Bold.woff2') format('woff2'),
         url('fonts/Gotham-Bold.woff') format('woff'),
         url('fonts/Gotham-Bold.ttf') format('truetype'),
         url('fonts/Gotham-Bold.svg#Gotham-Bold') format('svg');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Variablen (Design Tokens)
   ========================================================================== */

:root {
    /* TYPO */
    --mengentext: 'Gotham Book', Arial, sans-serif;
    --headline: 'Gotham Bold', Arial, sans-serif;
    --headlineLight: 'Gotham Book', Arial, sans-serif;
    --bold: 'Gotham Bold', Arial, sans-serif;

    /* SIZES - Basis für Fluid Typography oder Media Queries */
    --font60: 3.75rem; /* 60px */
    --font45: 2.8125rem; /* 45px */
    --font40: 2.5rem; /* 40px */
    --font35: 2.1875rem; /* 35px */
    --font32: 2rem; /* 32px */
    --font30: 1.875rem; /* 30px */
    --font25: 1.5625rem; /* 25px */
    --font19: 1.1875rem; /* 19px */
    --font17: 1.0625rem; /* 17px */
    --font14: 0.875rem; /* 14px */

    /* COLOR */
    --transparent: rgba(255, 255, 255, 0.5);
    --weiss: #ffffff;
    --hellgrau: #dfdfdf;
    --udgGelb: #fecc00;
    --udgBlau: #1a529a;
    --gruen: #08e012;
    --rot: #d90e2b;
    --dunkel: #333030;
    --titleHeading: #333030;
    --focusColor: #ff8c00; /* Accessibility Outline */

    /* GRADIENTS */
    --gradient: linear-gradient(45deg, rgba(15,28,90,1) 0%, rgba(43,114,183,1) 100%);
    --bg-gradient-fallback: linear-gradient(315deg, hsla(0, 0%, 91%, 1) 0%, hsla(0, 0%, 72%, 1) 100%);

    /* BORDER-RADIUS */
    --infoboxenRadius: 4px;

    /* SCHATTEN */
    --schattenNormal: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    --schattenHover: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.4) 0px 10px 10px -5px;
    --schattenSchrift: 1px 0px 5px rgba(0, 0, 0, 0.6);
    --paginationSchatten: rgba(254, 204, 0, 0.5);

    /* TRANSITIONS */
    --bewegung: all 300ms cubic-bezier(0.180, 0.745, 0.480, 0.635);
    --zoom: 1.04;
    
    /* GRID SYSTEM */
    --grid-gap: 30px;

    /* INNENABSTÄNDE */
    --innen15: 15px;
    --innen30: 30px;

    /* BODERRADIUS */
    --radius5: 5px;
}

/* ==========================================================================
   com_udg_tonnenbestellung Formular Styles (Verlinkt mit Design Tokens)
   ========================================================================== */

:root {
    --udg-primary: var(--udgBlau);
    --udg-primary-hover: var(--udgGelb);
    --udg-bg: var(--hellgrau);
    --udg-border: #ccc;
    --udg-error: var(--rot);
    --udg-text: var(--dunkel);
    --udg-radius: var(--infoboxenRadius);
}

.udg-wizard-container {
    margin: 0 auto;
    font-family: var(--mengentext);
    font-size: var(--font17);
    color: var(--udg-text);
    max-width: 1320px;
}

.udg-infobox {
    background-color: var(--weiss);
    border-top: 4px solid var(--udgBlau);
    border-radius: var(--infoboxenRadius);
    box-shadow: var(--schattenHover);
    padding: 3rem;
    margin-bottom: 2rem;
    transition: var(--bewegung);
}

@media (max-width: 768px) {
    .udg-infobox {
        padding: 1.5rem;
    }
}

.udg-section {
    padding: 3rem 0;
}

.udg-main-headline {
    font-family: var(--headline);
    color: var(--udgBlau);
    font-size: var(--font40);
    margin-bottom: 30px;
    text-align: center;
}

.udg-intro-text {
    margin-bottom: 40px;
    font-size: var(--font17);
    line-height: 1.6;
}

.udg-wizard-container h2 {
    font-family: var(--headline);
    color: var(--udgBlau);
    font-size: var(--font30);
    margin-bottom: 25px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Modern Progress Bar
   ========================================================================== */
.udg-modern-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.progress-track {
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 4px;
    background-color: var(--hellgrau);
    z-index: 1;
    border-radius: 2px;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 25%;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--hellgrau);
    color: var(--dunkel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--bold);
    font-size: var(--font19);
    margin-bottom: 10px;
    transition: var(--bewegung);
    border: 4px solid var(--weiss);
}

.progress-step.active .step-circle {
    background-color: var(--udgBlau);
    color: var(--weiss);
    transform: scale(1.1);
    box-shadow: var(--schattenNormal);
}

.step-label {
    font-family: var(--bold);
    font-size: var(--font14);
    color: #888;
    transition: var(--bewegung);
}

.progress-step.active .step-label {
    color: var(--udgBlau);
}

/* ==========================================================================
   Modernized Form Elements & Grid
   ========================================================================== */
.udg-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -20px;
    margin-right: -20px;
}

.udg-col-md-6, .udg-col-12 {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .udg-col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

.udg-form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.udg-form-group label {
    margin-bottom: 0.5rem;
    font-family: var(--bold);
    color: var(--dunkel);
    font-size: var(--font17);
}

.required-star {
    color: var(--udg-error);
}

.udg-input, .udg-select {
    padding: 16px 20px;
    background-color: var(--weiss);
    border: 1px solid #d1d5db; /* Zarter, moderner Rand */
    border-radius: var(--radius5);
    font-size: var(--font17);
    font-family: var(--mengentext);
    min-height: 56px; /* Etwas höher für bessere Proportionen */
    width: 100%;
    box-sizing: border-box;
    transition: var(--bewegung);
    color: var(--dunkel);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
}

.udg-input:hover, .udg-select:hover {
    border-color: #9ca3af;
}

.udg-input:focus, .udg-select:focus {
    outline: none;
    background-color: var(--weiss);
    border-color: var(--udgBlau);
    box-shadow: 0 0 0 4px rgba(26, 82, 154, 0.15); /* Sanfter blauer Leuchteffekt */
}

.udg-error {
    border-color: var(--udg-error) !important;
}

.udg-help-text {
    font-size: var(--font14);
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Matrix Layout (Mobile First -> Desktop Grid) */
.udg-matrix-container fieldset {
    border: 1px solid var(--udg-border);
    padding: 1.5rem;
    border-radius: var(--udg-radius);
    margin-bottom: 1.5rem;
    background: var(--weiss);
}

.udg-matrix-container legend {
    font-family: var(--bold);
    padding: 0 0.5rem;
    color: var(--dunkel);
}

/* Buttons */
.udg-btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.udg-btn {
    padding: 12px 28px;
    background-color: var(--udg-primary);
    color: var(--weiss);
    border: none;
    border-radius: var(--udg-radius);
    font-family: var(--bold);
    font-size: var(--font19);
    cursor: pointer;
    min-height: 48px;
    flex: 1;
    text-align: center;
    transition: var(--bewegung);
    box-shadow: var(--schattenNormal);
}

.udg-btn:hover {
    background-color: var(--udg-primary-hover);
    color: var(--dunkel);
    box-shadow: var(--schattenHover);
    transform: scale(var(--zoom));
}

@media (hover: none) {
    .udg-btn:hover {
        transform: none;
    }
}

.udg-btn-prev {
    background-color: #6c757d;
    color: #fff;
}

.udg-btn-prev:hover {
    background-color: #5a6268;
    color: #fff;
}

/* Alerts & Success */
.udg-alert, .udg-success {
    padding: 30px;
    border-radius: var(--udg-radius);
    margin-bottom: 2rem;
    box-shadow: var(--schattenNormal);
}

.udg-alert-warning {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

.udg-alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

.udg-group-error {
    padding: 12px;
    border: 1px solid var(--udg-error);
    border-radius: var(--radius5);
    background-color: #fff5f5;
}

.udg-toggle-group {
    display: flex;
    gap: 10px;
}

.udg-toggle-btn {
    flex: 1;
    cursor: pointer;
}

.udg-toggle-btn span {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--weiss);
    border: 2px solid #d1d5db;
    border-radius: var(--radius5);
    font-weight: bold;
    color: #4b5563;
    transition: var(--bewegung);
}

.udg-toggle-btn input:checked + span {
    background: var(--udgBlau);
    border-color: var(--udgBlau);
    color: var(--weiss);
    box-shadow: var(--schattenNormal);
}

.udg-toggle-btn input:focus-visible + span {
    outline: 3px solid var(--focusColor);
    outline-offset: 2px;
}

.udg-toggle-btn:hover span {
    border-color: var(--udgBlau);
}

.udg-success {
    background: var(--weiss);
    color: var(--dunkel);
    border-top: 4px solid #198754;
}

.udg-success-summary {
    margin-top: 1.5rem;
}

.udg-eco-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    margin: 1.5rem 0;
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius5);
    color: #14532d;
}

.udg-eco-note-icon {
    flex-shrink: 0;
    color: #15803d;
    margin-top: 2px;
}

.udg-eco-note-body strong {
    display: block;
    font-family: var(--bold);
    margin-bottom: 4px;
}

.udg-eco-note-body p {
    margin: 0;
    font-size: var(--font14);
    line-height: 1.5;
}

.udg-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.25rem;
}

.udg-btn-secondary {
    background-color: #ffffff;
    color: var(--udgBlau);
    border: 2px solid var(--udgBlau);
}

.udg-btn-secondary:hover {
    background-color: var(--udgBlau);
    color: var(--weiss);
}

.udg-btn:focus-visible {
    outline: 3px solid var(--focusColor);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .udg-infobox,
    .step-circle,
    .step-label,
    .udg-input,
    .udg-select,
    .udg-btn,
    .udg-toggle-btn span,
    .udg-bin-icons svg {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Desktop Enhancements */
@media (min-width: 768px) {
    .udg-matrix-container fieldset {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .udg-btn-group {
        justify-content: flex-end;
    }
    .udg-btn {
        flex: 0 1 auto;
    }
}

/* The print logic is now handled robustly via JavaScript in wizard.js */

/* Bin Icons Styling */
.udg-bin-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    min-height: 60px;
}
.udg-bin-icons svg {
    width: 45px;
    height: auto;
    transition: var(--bewegung);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
