/**
 * DACOR Shop Public Styles
 * Frontend-Styling 
 */

/* ===== WRAPPER ===== */
.dacor-verfuegbarkeit-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== LOADING OVERLAY ===== */
#dacor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dacor-loading {
    background: #fff;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#dacor-loading p {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

/* ===== FORMULARE ===== */
.dacor-form {
    background: #f9f9f9;
    padding: 30px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.dacor-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.dacor-form-group {
    flex: 1;
}

.dacor-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.dacor-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    font-size: 16px;
    transition: all 0.3s ease;
}

.dacor-input:focus {
    outline: none;
    border-color: #84b414;
    box-shadow: 0 0 0 3px rgba(132, 180, 20, 0.1);
}

.dacor-input.error {
    border-color: #dc3545;
}

.dacor-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
}

/* ===== BUTTONS ===== */
.dacor-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.dacor-btn-primary {
    background: #84b414;
    color: #fff;
    border: 2px solid #5e7f11;
}

.dacor-btn-primary:hover {
    background: #5e7f11;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 127, 17, 0.3);
}

.dacor-btn-secondary {
    background: #6c757d;
    color: #fff;
    border: 2px solid #5a6268;
}

.dacor-btn-secondary:hover {
    background: #5a6268;
}

/* ===== COLUMN GRID ===== */
.dacor-col-2 { flex: 0 0 calc(16.666% - 12.5px); }
.dacor-col-4 { flex: 0 0 calc(33.333% - 10px); }
.dacor-col-6 { flex: 0 0 calc(50% - 7.5px); }
.dacor-col-8 { flex: 0 0 calc(66.666% - 5px); }

/* ===== RESULT CONTAINER ===== */
#dacor-result-container {
    margin-top: 30px;
}

.dacor-result-success {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    padding: 25px;
}

.dacor-result-success h3 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 15px;
}

.dacor-address-display {
    background: #fff;
    padding: 15px;
    border-left: 4px solid #84b414;
    margin: 15px 0;
}

.dacor-result-error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    padding: 25px;
}

.dacor-result-error h3 {
    color: #721c24;
    margin-top: 0;
    margin-bottom: 15px;
}

.dacor-result-error ul {
    margin: 15px 0;
    padding-left: 20px;
}

.dacor-result-error li {
    margin-bottom: 8px;
}

/* ===== PIB DOWNLOAD LINK ===== */
.dacor-tarif-pib {
    margin: 15px 0 10px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.dacor-pib-link,
.dacor-pib-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #84b414;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dacor-pib-link:hover,
.dacor-pib-download:hover {
    color: #5e7f11;
    text-decoration: underline;
}

.dacor-pib-link .dashicons,
.dacor-pib-download .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.dacor-pib-info {
    margin-top: 15px;
    padding: 12px;
    background: #fff;
    text-align: center;
}

/* ===== TARIF CARDS ===== */
.dacor-tarife-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dacor-tarif-card {
    background: #fff;
    border: 2px solid #ddd;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.dacor-tarif-card:hover {
    border-color: #84b414;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dacor-tarif-card.hot {
    border-color: #84b414;
    box-shadow: 0 0 0 2px #84b414;
}

.dacor-tarif-card.hot::before {
    content: "EMPFEHLUNG";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #84b414;
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dacor-tarif-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.dacor-tarif-price {
    font-size: 32px;
    font-weight: 700;
    color: #84b414;
    margin: 15px 0;
}

.dacor-tarif-price small {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.dacor-tarif-attributes {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.dacor-tarif-attributes li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.dacor-tarif-attributes li:last-child {
    border-bottom: none;
}

.dacor-tarif-select {
    margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dacor-form-row {
        flex-direction: column;
    }

    .dacor-col-2,
    .dacor-col-4,
    .dacor-col-6,
    .dacor-col-8 {
        flex: 0 0 100%;
    }

    .dacor-tarife-grid {
        grid-template-columns: 1fr;
    }

    .dacor-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dacor-verfuegbarkeit-wrapper {
        padding: 10px;
    }

    .dacor-btn {
        width: 100%;
        padding: 14px;
    }
}

/* ===== AUTOCOMPLETE ===== */
.dacor-input[list]::-webkit-calendar-picker-indicator {
    display: none;
}

/* ===== UTILITY ===== */
.dacor-text-center {
    text-align: center;
}

.dacor-mt-20 {
    margin-top: 20px;
}

.dacor-mb-20 {
    margin-bottom: 20px;
}

/* ===== BESTELLFORMULAR ===== */
.dacor-bestellformular-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Selected Tarif Info */
.dacor-selected-tarif-info {
    background: #f0f7e6;
    border: 2px solid #84b414;
    padding: 20px;
    margin-bottom: 30px;
}

.dacor-selected-tarif-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #5e7f11;
}

.dacor-tarif-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
}

.dacor-tarif-summary-name {
    display: flex;
    flex-direction: column;
}

.dacor-tarif-summary-name strong {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.dacor-techniktyp {
    display: inline-block;
    background: #84b414;
    color: #fff;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.dacor-tarif-summary-price {
    text-align: right;
}

.dacor-price-month {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #84b414;
}

.dacor-price-einmalig {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.dacor-address-summary {
    background: #fff;
    padding: 12px 15px;
}

.dacor-address-summary strong {
    color: #5e7f11;
    margin-right: 8px;
}

/* Progress Steps */
.dacor-form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.dacor-form-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.dacor-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #ddd;
    font-weight: 700;
    color: #999;
    transition: all 0.3s ease;
}

.dacor-progress-step.active .step-number {
    background: #84b414;
    border-color: #84b414;
    color: #fff;
}

.dacor-progress-step.completed .step-number {
    background: #5e7f11;
    border-color: #5e7f11;
    color: #fff;
}

.step-label {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.dacor-progress-step.active .step-label {
    color: #84b414;
}

/* Form Steps */
.dacor-form-step {
    display: none;
    background: #f9f9f9;
    padding: 30px;
    border: 1px solid #ddd;
}

.dacor-form-step.active {
    display: block;
}

.dacor-form-step h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.dacor-form-step h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #5e7f11;
    font-size: 18px;
}

/* Form Fields */
.dacor-form-field {
    flex: 1;
    margin-bottom: 20px;
}

.dacor-form-field.dacor-field-full {
    flex: 0 0 100%;
}

.dacor-form-field.dacor-field-small {
    flex: 0 0 calc(33.333% - 10px);
}

.dacor-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.dacor-form-field input[type="text"],
.dacor-form-field input[type="email"],
.dacor-form-field input[type="tel"],
.dacor-form-field input[type="date"],
.dacor-form-field input[type="number"],
.dacor-form-field input[type="datetime-local"],
.dacor-form-field select,
.dacor-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    font-size: 16px;
    transition: all 0.3s ease;
}

.dacor-form-field input:focus,
.dacor-form-field select:focus,
.dacor-form-field textarea:focus {
    outline: none;
    border-color: #84b414;
    box-shadow: 0 0 0 3px rgba(132, 180, 20, 0.1);
}

.dacor-form-field input.error,
.dacor-form-field select.error,
.dacor-form-field textarea.error {
    border-color: #dc3545;
}

.dacor-form-field small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

/* Radio Groups */
.dacor-radio-group {
    display: flex;
    gap: 20px;
}

.dacor-radio-label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.dacor-radio-label input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-right: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}

.dacor-radio-label input[type="radio"]:checked {
    border-color: #84b414;
    background: #84b414;
}

.dacor-radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

/* Checkbox Labels */
.dacor-checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
}

.dacor-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.dacor-checkbox-label.dacor-sepa-mandate {
    font-weight: 600;
}

.dacor-mandate-text {
    display: block;
    margin-top: 10px;
    padding: 12px;
    background: #fff;
    border-left: 3px solid #84b414;
    font-size: 12px;
    line-height: 1.6;
}

/* Form Navigation */
.dacor-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.dacor-btn-success {
    background: #28a745;
    color: #fff;
    border: 2px solid #1e7e34;
    font-size: 18px;
    padding: 15px 40px;
}

.dacor-btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.3);
}

.dacor-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Order Summary */
.dacor-order-summary {
    background: #fff;
    border: 2px solid #84b414;
    padding: 25px;
    margin-bottom: 30px;
}

.dacor-order-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #5e7f11;
    font-size: 22px;
}

.dacor-summary-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.dacor-summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dacor-summary-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

.dacor-summary-section p {
    margin: 5px 0;
    color: #666;
    line-height: 1.6;
}

/* AGB Section */
.dacor-agb-section {
    background: #fffbea;
    border: 2px solid #ffecb3;
    padding: 20px;
    margin-bottom: 20px;
}

.dacor-agb-section .dacor-form-field {
    margin-bottom: 15px;
}

.dacor-agb-section a {
    color: #84b414;
    font-weight: 600;
    text-decoration: underline;
}

.dacor-agb-section a:hover {
    color: #5e7f11;
}

/* Loading Overlay for Order Form */
#dacor-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#dacor-loading-overlay p {
    color: #fff;
    font-size: 18px;
    margin-top: 20px;
}

.dacor-loading-spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #84b414;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notice Boxes */
.dacor-notice {
    padding: 20px;
    margin: 20px 0;
}

.dacor-notice-error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

.dacor-notice-error p {
    margin: 0 0 15px 0;
}

.dacor-notice-error a {
    color: #721c24;
    font-weight: 600;
    text-decoration: underline;
}

/* Responsive for Order Form */
@media (max-width: 768px) {
    .dacor-bestellformular-wrapper {
        padding: 10px;
    }

    .dacor-form-step {
        padding: 20px;
    }

    .dacor-tarif-summary {
        flex-direction: column;
        gap: 15px;
    }

    .dacor-tarif-summary-price {
        text-align: left;
    }

    .dacor-form-progress {
        flex-wrap: wrap;
    }

    .dacor-progress-step {
        flex: 0 0 20%;
    }

    .step-label {
        font-size: 10px;
    }

    .dacor-radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .dacor-form-navigation {
        flex-direction: column-reverse;
    }

    .dacor-form-navigation .dacor-btn {
        width: 100%;
    }

    /* Bestellformular - Eingabefelder volle Breite auf Mobile */
    .dacor-bestellformular-wrapper .dacor-form-row {
        flex-direction: column;
        gap: 15px;
    }

    .dacor-bestellformular-wrapper .dacor-form-field {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
    }

    .dacor-bestellformular-wrapper .dacor-form-field.dacor-field-small {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
    }

    .dacor-bestellformular-wrapper .dacor-form-field.dacor-field-full {
        flex: 0 0 100%;
        width: 100%;
    }

    .dacor-bestellformular-wrapper .dacor-form-field input[type="text"],
    .dacor-bestellformular-wrapper .dacor-form-field input[type="email"],
    .dacor-bestellformular-wrapper .dacor-form-field input[type="tel"],
    .dacor-bestellformular-wrapper .dacor-form-field input[type="date"],
    .dacor-bestellformular-wrapper .dacor-form-field input[type="number"],
    .dacor-bestellformular-wrapper .dacor-form-field input[type="datetime-local"],
    .dacor-bestellformular-wrapper .dacor-form-field select,
    .dacor-bestellformular-wrapper .dacor-form-field textarea {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .dacor-selected-tarif-info {
        padding: 15px;
    }

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

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-label {
        display: none;
    }

    .dacor-order-summary {
        padding: 15px;
    }

    .dacor-btn-success {
        font-size: 16px;
        padding: 12px 20px;
    }
}
