/* Richtfunk-Konfigurator Wizard Styles */
/* Omnitron Design: No rounded corners, no gradients, no soft shadows */

:root {
    --rf-blue: rgb(0, 74, 151);
    --rf-orange: rgb(208, 120, 2);
    --rf-grey: rgb(127, 127, 127);
    --rf-light-grey: rgb(240, 240, 240);
    --rf-white: rgb(255, 255, 255);
    --rf-black: rgb(0, 0, 0);
    --rf-error: rgb(200, 40, 40);
}

/* Base container */
.rf-konfigurator {
    font-family: 'PT Sans', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: var(--rf-black);
}

/* Progress indicator */
.rf-wizard__progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--rf-grey);
    padding-bottom: 20px;
}

.rf-wizard__progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.rf-wizard__progress-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rf-grey);
    color: var(--rf-white);
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 18px;
}

.rf-wizard__progress-step--active .rf-wizard__progress-number,
.rf-wizard__progress-step--completed .rf-wizard__progress-number {
    background: var(--rf-orange);
}

.rf-wizard__progress-label {
    margin-top: 8px;
    font-size: 14px;
    color: var(--rf-grey);
}

.rf-wizard__progress-step--active .rf-wizard__progress-label {
    color: var(--rf-black);
    font-weight: 700;
}

.rf-wizard__progress-step--completed {
    cursor: pointer;
}

.rf-wizard__progress-step--completed:hover .rf-wizard__progress-number {
    background: rgb(180, 90, 0);
}

/* Step content */
.rf-wizard__step {
    padding: 20px 0;
}

.rf-wizard__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: var(--rf-blue);
    margin: 0 0 10px 0;
}

.rf-wizard__description {
    font-size: 16px;
    color: var(--rf-grey);
    margin: 0 0 30px 0;
}

/* Form elements */
.rf-form__locations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 24px;
}

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

.rf-form__group {
    margin-bottom: 20px;
}

.rf-form__locations .rf-form__group {
    margin-bottom: 0;
}

.rf-form__label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--rf-black);
}

.rf-form__required-star {
    color: #e53e3e;
}

.rf-form__required-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.rf-form__optional-note {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.rf-form__input,
.rf-form__select,
.rf-form__textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--rf-grey);
    font-family: 'PT Sans', Arial, sans-serif;
    font-size: 16px;
    background: var(--rf-white);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.rf-form__input:focus,
.rf-form__select:focus,
.rf-form__textarea:focus {
    outline: none;
    border-color: var(--rf-blue);
}

.rf-form__input--error {
    border-color: var(--rf-error);
}

.rf-form__coordinates {
    margin-top: 5px;
    font-size: 12px;
    color: var(--rf-grey);
}

/* Address autocomplete */
.rf-autocomplete {
    position: relative;
}

.rf-autocomplete__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--rf-white);
    border: 2px solid var(--rf-grey);
    border-top: none;
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
}

.rf-autocomplete__item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
}

.rf-autocomplete__item:hover,
.rf-autocomplete__item--highlight {
    background: var(--rf-light-grey);
}

.rf-form__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.rf-konfigurator .rf-form__group--checkbox {
    margin-top: 20px;
}

.rf-konfigurator .rf-form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.rf-konfigurator .rf-form__checkbox {
    flex-shrink: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    position: relative;
    top: 1px;
}

.rf-konfigurator .rf-form__checkbox-label a {
    color: var(--rf-blue);
    text-decoration: underline;
}

.rf-form__textarea {
    resize: vertical;
    min-height: 96px;
}

.rf-form__char-count {
    margin-top: 6px;
    font-size: 12px;
    color: var(--rf-grey);
    text-align: right;
}

/* Buttons */
.rf-button,
a.rf-button {
    padding: 12px 30px;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.rf-button--primary {
    background: var(--rf-blue);
    color: var(--rf-white);
}

.rf-button--primary:hover:not(:disabled) {
    background: rgb(0, 60, 120);
}

.rf-button--secondary {
    background: var(--rf-grey);
    color: var(--rf-white);
}

.rf-button--secondary:hover:not(:disabled) {
    background: rgb(100, 100, 100);
}

.rf-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rf-button--full {
    width: 100%;
}

/* Wizard actions */
.rf-wizard__actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--rf-light-grey);
}

.rf-wizard__actions .rf-button--next:only-child {
    margin-left: auto;
}

/* Result display */
.rf-result {
    background: var(--rf-light-grey);
    padding: 30px;
    margin-top: 30px;
    position: relative;
}

.rf-result--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.rf-result--loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(0, 74, 151, 0.25);
    border-top-color: var(--rf-blue);
    border-radius: 50%;
    animation: rf-spin 0.7s linear infinite;
    z-index: 1;
}

.rf-result__distance {
    text-align: center;
    margin-bottom: 30px;
}

.rf-result__label {
    font-size: 16px;
    color: var(--rf-grey);
}

.rf-result__value {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 48px;
    color: var(--rf-blue);
    margin: 0 10px;
}

.rf-result__unit {
    font-size: 24px;
    color: var(--rf-grey);
}

/* Elevation chart */
.rf-elevation {
    margin-top: 20px;
}

.rf-elevation__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: var(--rf-blue);
    margin: 0 0 15px 0;
}

.rf-elevation__chart {
    width: 100%;
    height: auto;
    background: var(--rf-white);
    border: 1px solid var(--rf-grey);
}

.rf-elevation__info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.rf-elevation__point {
    font-size: 14px;
}

.rf-elevation__label {
    font-weight: 700;
    color: var(--rf-blue);
}

/* Bandwidth options */
.rf-bandwidth__info {
    margin-bottom: 20px;
    font-size: 16px;
}

.rf-bandwidth__distance {
    font-weight: 700;
    color: var(--rf-blue);
}

.rf-bandwidth__options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.rf-bandwidth__note {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.rf-bandwidth__option {
    padding: 20px;
    border: 2px solid var(--rf-grey);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.rf-bandwidth__option:hover {
    border-color: var(--rf-blue);
}

.rf-bandwidth__option--selected {
    border-color: var(--rf-orange);
    background: rgba(208, 120, 2, 0.1);
}

.rf-bandwidth__option--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rf-bandwidth__value {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--rf-blue);
}

.rf-bandwidth__unit {
    display: block;
    font-size: 14px;
    color: var(--rf-grey);
    margin-top: 5px;
}

/* Services */
.rf-services {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rf-service {
    padding: 20px;
    border: 2px solid var(--rf-grey);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.rf-service--selected {
    border-color: var(--rf-orange);
    background: rgba(208, 120, 2, 0.1);
}

.rf-service__main {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    margin: 0;
    font-weight: inherit;
}

.rf-service__checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.rf-service__label {
    font-weight: 700;
    font-size: 16px;
}

.rf-service__text {
    display: flex;
    flex-direction: column;
}

.rf-service__description {
    font-size: 13px;
    color: var(--rf-grey);
    margin-top: 4px;
}

.rf-service__bullets {
    margin: 8px 0 0 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--rf-grey);
    list-style: disc;
}

.rf-service__bullets li {
    margin-bottom: 3px;
}

.rf-service__upgrade {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rf-service__upgrade-label {
    font-size: 14px;
    color: var(--rf-grey);
}

.rf-service__upgrade-toggle {
    width: 50px;
    height: 26px;
    background: var(--rf-grey);
    position: relative;
    cursor: pointer;
}

.rf-service__upgrade-toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--rf-white);
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.rf-service__upgrade-toggle--active {
    background: var(--rf-orange);
}

.rf-service__upgrade-toggle--active::after {
    left: 26px;
}

.rf-service__upgrade-toggle--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Products */
.rf-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rf-product {
    padding: 25px;
    border: 2px solid var(--rf-grey);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.rf-product:hover:not(.rf-product--disabled) {
    border-color: var(--rf-blue);
    background: rgba(0, 74, 151, 0.04);
    box-shadow: 0 2px 8px rgba(0, 74, 151, 0.15);
}

.rf-product--selected {
    border-color: var(--rf-orange);
    background: rgba(208, 120, 2, 0.1);
}

.rf-product--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    /* Block clicks on the encryption checkbox (and other controls) inside unavailable product cards. */
    pointer-events: none;
}

.rf-product__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rf-product__name {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--rf-blue);
}

.rf-product__badge {
    padding: 5px 15px;
    background: var(--rf-grey);
    color: var(--rf-white);
    font-size: 12px;
    font-weight: 700;
}

.rf-product--selected .rf-product__badge {
    background: var(--rf-orange);
}

.rf-product__info {
    font-size: 14px;
    color: var(--rf-grey);
}

.rf-product__features {
    margin: 12px 0;
    padding: 0 0 0 20px;
    list-style: disc;
    font-size: 14px;
    color: var(--rf-black);
}

.rf-product__features li {
    margin-bottom: 4px;
}

.rf-product__option {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rf-light-grey);
}

.rf-product__option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.rf-product__encryption {
    width: 18px;
    height: 18px;
}

.rf-product__services {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rf-light-grey);
}

.rf-product__services-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--rf-grey);
    display: block;
    margin-bottom: 6px;
}

.rf-product__services-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--rf-grey);
    list-style: disc;
}

.rf-product__services-list li {
    margin-bottom: 2px;
}

/* Line-of-sight info alert */
.rf-alert--info {
    border-left-color: var(--rf-blue);
    background: rgba(0, 74, 151, 0.08);
    margin-top: 16px;
    font-weight: bold;
}

/* Line-of-sight warning (restricted visibility). Signal colour: orange.
 * Doubled class selector so the later base `.rf-alert` rule cannot win specificity. */
.rf-alert.rf-alert--los {
    border: none;
    border-left: none;
    background: var(--rf-orange);
    color: var(--rf-white);
    margin: 16px 0;
    padding: 16px 20px;
    font-weight: bold;
}

.rf-alert.rf-alert--los .rf-alert__title,
.rf-alert.rf-alert--los .rf-alert__message {
    color: var(--rf-white);
}

/* Modal */
.rf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rf-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.rf-modal__content {
    position: relative;
    background: var(--rf-white);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.rf-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: var(--rf-grey);
    cursor: pointer;
    line-height: 1;
}

.rf-modal__close:hover {
    color: var(--rf-black);
}

.rf-modal__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--rf-blue);
    margin: 0 0 10px 0;
}

.rf-modal__description {
    font-size: 14px;
    color: var(--rf-grey);
    margin: 0 0 30px 0;
}

/* Error messages */
.rf-error {
    color: var(--rf-error);
    font-size: 14px;
    margin-top: 5px;
}

/* Loading state */
.rf-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.rf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--rf-white);
    border-radius: 50%;
    animation: rf-spin 0.7s linear infinite;
}

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

/* Success message */
.rf-success {
    text-align: center;
    padding: 40px;
}

.rf-success__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--rf-orange);
    user-select: none;
    caret-color: transparent;
    pointer-events: none;
}

.rf-success__icon::before {
    content: '\2713';
    display: block;
    font-size: 60px;
    line-height: 1;
    user-select: none;
    caret-color: transparent;
}

.rf-success__title {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--rf-blue);
    margin: 0 0 10px 0;
}

.rf-success__message {
    font-size: 16px;
    color: var(--rf-grey);
}

/* Responsive */
@media (max-width: 768px) {
    .rf-wizard__progress {
        flex-wrap: wrap;
    }

    .rf-wizard__progress-step {
        width: 50%;
        margin-bottom: 15px;
    }

    .rf-result__value {
        font-size: 36px;
    }

    .rf-bandwidth__options {
        grid-template-columns: repeat(2, 1fr);
    }

    .rf-modal__content {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .rf-wizard__progress-step {
        width: 100%;
    }

    .rf-bandwidth__options {
        grid-template-columns: 1fr;
    }

    .rf-wizard__actions {
        flex-direction: column;
        gap: 10px;
    }

    .rf-wizard__actions .rf-button {
        width: 100%;
    }
}

/* Toast notifications */
.rf-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--rf-blue);
    color: var(--rf-white);
    font-size: 14px;
    z-index: 2000;
    animation: rf-slide-in 0.3s ease-out;
}

.rf-toast--error {
    background: var(--rf-error);
}

.rf-toast--success {
    background: rgb(40, 167, 69);
}

@keyframes rf-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Alert box styling */
.rf-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--rf-blue);
    background: rgba(0, 74, 151, 0.1);
}

.rf-alert--error {
    border-left-color: var(--rf-error);
    background: rgba(200, 40, 40, 0.1);
}

.rf-alert--warning {
    border-left-color: var(--rf-orange);
    background: rgba(208, 120, 2, 0.1);
}

.rf-alert__title {
    font-weight: 700;
    margin-bottom: 5px;
}

.rf-alert__message {
    font-size: 14px;
}

/* Form field states */
.rf-form__input:disabled,
.rf-form__select:disabled {
    background: var(--rf-light-grey);
    cursor: not-allowed;
}

.rf-form__input:focus-visible,
.rf-form__select:focus-visible {
    outline: 2px solid var(--rf-orange);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.rf-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 10px 20px;
    background: var(--rf-blue);
    color: var(--rf-white);
}

.rf-skip-link:focus {
    left: 0;
    top: 0;
}

/* Print styles */
@media print {
    .rf-wizard__progress,
    .rf-wizard__actions,
    .rf-button,
    .rf-modal {
        display: none !important;
    }

    .rf-wizard__step {
        display: block !important;
        page-break-after: always;
    }

    .rf-result {
        background: none;
        border: 1px solid var(--rf-grey);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .rf-button--primary {
        border: 2px solid var(--rf-white);
    }

    .rf-form__input,
    .rf-form__select {
        border-width: 3px;
    }

    .rf-service,
    .rf-product,
    .rf-bandwidth__option {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rf-loading::after,
    .rf-toast,
    .rf-service__upgrade-toggle::after {
        animation: none;
        transition: none;
    }
}

/* Interactive Google Map */
.rf-interactive-map {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 20px;
    border: 2px solid var(--rf-grey);
}

.rf-interactive-map__hint {
    font-size: 13px;
    color: var(--rf-grey);
    margin: 8px 0 0 0;
}

/* Cookie-consent placeholder shown until the visitor allows the external map. */
.rf-interactive-map__consent {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    text-align: center;
    background: var(--rf-light-grey);
}

.rf-interactive-map__consent-message {
    max-width: 520px;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rf-black);
}

.rf-interactive-map--ready .rf-interactive-map__consent {
    display: none;
}

@media (max-width: 600px) {
    .rf-interactive-map {
        height: 300px;
    }
}

/* Strict-mode consent gate shown above the location fields until the visitor consents. */
.rf-consent-gate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 6px;
    background: var(--rf-light-grey);
    border: 1px solid var(--rf-grey);
}

.rf-consent-gate__message {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rf-black);
}

.rf-consent-gate--granted {
    display: none;
}
