/* EPCAN Neubau-Anschluss Plugin Styles */

.epcan-neubau-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.epcan-neubau-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

.epcan-neubau-container h3 {
    margin: 25px 0 15px;
}

/* === PROGRESS BAR === */
.epcan-neubau-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.epcan-neubau-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.epcan-neubau-step span {
    font-size: 11px;
    color: #999;
    text-align: center;
    white-space: nowrap;
}

.epcan-neubau-step.active span {
    color: #F1800E;
    font-weight: 600;
}

.epcan-neubau-step.completed span {
    color: #122538;
}

.epcan-neubau-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    background: #fff;
    transition: all 0.3s ease;
}

.epcan-neubau-step.active .epcan-neubau-step-circle {
    border-color: #F1800E;
    background: #F1800E;
    color: #fff;
}

.epcan-neubau-step.completed .epcan-neubau-step-circle {
    border-color: #122538;
    background: #122538;
    color: #fff;
}

.epcan-neubau-step-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 4px;
    margin-bottom: 24px;
    transition: background 0.3s ease;
}

.epcan-neubau-step-line.completed {
    background: #122538;
}

/* === INFO BOX === */
.epcan-neubau-info {
    background: #e8f4f8;
    border-left: 4px solid #004D9F;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
    line-height: 1.6;
}

/* === FORM FIELDS === */
.epcan-neubau-field {
    margin-bottom: 18px;
}

.epcan-neubau-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.epcan-neubau-field input[type="text"],
.epcan-neubau-field input[type="email"],
.epcan-neubau-field input[type="tel"],
.epcan-neubau-field input[type="number"],
.epcan-neubau-field input[type="date"],
.epcan-neubau-field select,
.epcan-neubau-field textarea {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.epcan-neubau-field textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.epcan-neubau-field input:focus,
.epcan-neubau-field select:focus,
.epcan-neubau-field textarea:focus {
    border-color: #004D9F;
    box-shadow: 0 0 0 3px rgba(0, 77, 159, 0.1);
    outline: none;
}

.epcan-neubau-field input.error,
.epcan-neubau-field select.error,
.epcan-neubau-field textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.epcan-neubau-field .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.epcan-neubau-field small {
    color: #666;
    font-size: 12px;
}

/* === FORM ROWS === */
.epcan-neubau-form-row {
    display: flex;
    gap: 15px;
}

.epcan-neubau-field--half {
    flex: 1;
}

.epcan-neubau-field--third {
    flex: 0 0 33%;
}

.epcan-neubau-field--twothirds {
    flex: 1;
}

/* === RADIO BUTTONS === */
.epcan-neubau-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.epcan-neubau-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
}

.epcan-neubau-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.epcan-neubau-radio .radio-mark {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    background: #fff;
}

.epcan-neubau-radio input[type="radio"]:checked + .radio-mark {
    border-color: #F1800E;
}

.epcan-neubau-radio input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: #F1800E;
    border-radius: 50%;
}

.epcan-neubau-radio:hover .radio-mark {
    border-color: #999;
}

/* === CHECKBOXES === */
.epcan-neubau-checkbox-row {
    margin-bottom: 18px;
}

.epcan-neubau-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
}

.epcan-neubau-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.epcan-neubau-checkbox .checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #ccc;
    border-radius: 3px;
    margin-right: 10px;
    margin-top: 2px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #fff;
}

.epcan-neubau-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #004D9F;
    border-color: #004D9F;
}

.epcan-neubau-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.epcan-neubau-checkbox:hover .checkmark {
    border-color: #999;
}

.epcan-neubau-checkbox a {
    color: #004D9F;
    text-decoration: underline;
}

/* === CHECKLIST === */
.epcan-neubau-checklist {
    background: #f8f9fa;
    padding: 20px 20px 20px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.epcan-neubau-checklist ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.epcan-neubau-checklist li {
    padding: 4px 0;
    font-size: 14px;
}

/* === FILE UPLOAD === */
.epcan-neubau-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 15px;
}

.epcan-neubau-upload-area:hover,
.epcan-neubau-upload-area.dragover {
    border-color: #004D9F;
    background: #f0f7ff;
}

.epcan-neubau-upload-icon {
    margin-bottom: 10px;
}

.epcan-neubau-upload-icon svg {
    width: 40px;
    height: 40px;
    color: #999;
}

.epcan-neubau-upload-hint {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.epcan-neubau-upload-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.epcan-neubau-upload-btn:hover {
    border-color: #004D9F;
    color: #004D9F;
}

/* File List */
.epcan-neubau-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.epcan-neubau-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
}

.epcan-neubau-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.epcan-neubau-file-item .file-size {
    color: #999;
    font-size: 12px;
    margin: 0 15px;
}

.epcan-neubau-file-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
    line-height: 1;
}

.epcan-neubau-file-remove:hover {
    color: #a71d2a;
}

/* === SUMMARY (Step 6) === */
.epcan-neubau-summary {
    margin-bottom: 25px;
}

.epcan-neubau-summary-section {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.epcan-neubau-summary-section h4 {
    background: #f8f9fa;
    padding: 12px 16px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.epcan-neubau-summary-row {
    display: flex;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.epcan-neubau-summary-row:last-child {
    border-bottom: none;
}

.epcan-neubau-summary-label {
    font-weight: 600;
    color: #555;
    width: 220px;
    flex-shrink: 0;
}

.epcan-neubau-summary-value {
    color: #333;
}

.epcan-neubau-summary-edit {
    margin-left: auto;
    color: #004D9F;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    flex-shrink: 0;
}

.epcan-neubau-summary-edit:hover {
    color: #F1800E;
}

/* === NAVIGATION BUTTONS === */
.epcan-neubau-nav {
    display: flex;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.epcan-neubau-nav-spacer {
    flex: 1;
}

.epcan-neubau-btn-back {
    background: none;
    border: none;
    color: #F1800E;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    font-family: inherit;
}

.epcan-neubau-btn-back:hover {
    color: #d8720d;
}

.epcan-neubau-btn-next,
.epcan-neubau-btn-submit {
    background: #F1800E;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.epcan-neubau-btn-next:hover,
.epcan-neubau-container .epcan-neubau-btn-next:hover {
    background-color: #F1800E !important;
    background-image: none !important;
    color: white !important;
    opacity: 0.85;
}

.epcan-neubau-container .epcan-neubau-btn-submit:hover {
    background-color: #122538 !important;
    background-image: none !important;
    color: white !important;
    opacity: 0.85;
}

.epcan-neubau-btn-next:disabled,
.epcan-neubau-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.epcan-neubau-btn-submit {
    background: #122538;
}

.epcan-neubau-btn-back:hover,
.epcan-neubau-container .epcan-neubau-btn-back:hover {
    background-color: transparent !important;
    background-image: none !important;
    opacity: 0.7;
}

/* Loading state for submit */
.epcan-neubau-btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.epcan-neubau-btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: epcan-neubau-spin 0.6s linear infinite;
}

@keyframes epcan-neubau-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === SUCCESS MESSAGE === */
.epcan-neubau-success {
    text-align: center;
    padding: 40px 20px;
}

.epcan-neubau-success-icon svg {
    width: 80px;
    height: 80px;
    color: #28a745;
    margin-bottom: 20px;
}

.epcan-neubau-success p {
    max-width: 500px;
    margin: 10px auto;
}

.epcan-neubau-success a {
    color: #004D9F;
}

/* === REQUIRED HINT === */
.epcan-neubau-required-hint {
    text-align: right;
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* === MOBILE === */
@media (max-width: 768px) {
    .epcan-neubau-container {
        padding: 15px;
    }

    .epcan-neubau-progress {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .epcan-neubau-step {
        min-width: 60px;
    }

    .epcan-neubau-step span {
        font-size: 9px;
    }

    .epcan-neubau-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .epcan-neubau-form-row {
        flex-direction: column;
        gap: 0;
    }

    .epcan-neubau-field--third,
    .epcan-neubau-field--twothirds,
    .epcan-neubau-field--half {
        flex: none;
        width: 100%;
    }

    .epcan-neubau-summary-row {
        flex-direction: column;
    }

    .epcan-neubau-summary-label {
        width: 100%;
        margin-bottom: 2px;
    }

    .epcan-neubau-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .epcan-neubau-btn-next,
    .epcan-neubau-btn-submit {
        width: 100%;
        order: 1;
    }

    .epcan-neubau-btn-back {
        order: 2;
        width: 100%;
        text-align: center;
    }

    .epcan-neubau-nav-spacer {
        display: none;
    }
}
