/* EPCAN Verfügbarkeitscheck Plugin Styles */

.epcan-check-container {
    font-family: "Lato", Helvetica, Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    color: #000000;
}

.epcan-check-container h1, 
.epcan-check-container h2, 
.epcan-check-container h3, 
.epcan-check-container h4 {
    font-family: "Lato", Helvetica, Arial, sans-serif;
    color: #1b304d;
}

/* === SKELETON LOADING === */
.epcan-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: epcan-skeleton-loading 1.5s infinite;
}

@keyframes epcan-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.epcan-select-skeleton {
    height: 44px;
    border-radius: 6px;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.epcan-select-skeleton.hidden {
    display: none;
}

/* === FORM DESIGN === */
.epcan-form-container {
    max-width: 100%;
    padding: 0;
}

.epcan-start-heading {
    text-align: left;
    color: #1b304d;
    margin-bottom: 20px;
}

.epcan-check-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.epcan-form-field {
    width: 100%;
    height: 44px;  /* Feste Höhe statt min-height für konsistentes Layout */
    position: relative;
}

/* PLZ Field spezielle ID für Skeleton Overlay */
#epcan-plz-field .bootstrap-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#epcan-plz-field .bootstrap-select.ready {
    opacity: 1;
}

.epcan-form-row-split {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 44px;  /* Auch für Split-Row feste Höhe */
}

.epcan-form-row-split .epcan-form-field {
    flex: 1;
}

/* === INPUT & SELECT STYLES === */
.epcan-form-field input,
.epcan-form-field select {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

/* === BOOTSTRAP SELECT STYLES === */
.epcan-form-field .bootstrap-select {
    width: 100% !important;
    display: block !important;
}

/* Ursprüngliches select Element NUR verstecken wenn Bootstrap Select aktiv ist */
.epcan-form-field .bootstrap-select select {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* PLZ Select initial versteckt (wird per JavaScript gezeigt) */
.epcan-plz-select {
    display: none;
}

.epcan-form-field .bootstrap-select .dropdown-toggle {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

.epcan-form-field .bootstrap-select .dropdown-menu {
    z-index: 1050 !important;
    width: 100% !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* === STATES === */
.epcan-form-field input:focus,
.epcan-form-field .bootstrap-select.show .dropdown-toggle,
.epcan-form-field .bootstrap-select .dropdown-toggle:focus {
    border-color: #004D9F !important;
    box-shadow: 0 0 0 3px rgba(0, 77, 159, 0.1) !important;
    outline: none !important;
}

.epcan-form-field input:disabled,
.epcan-form-field .bootstrap-select.disabled .dropdown-toggle {
    background: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
}

/* Reset Browser Autofill Styles */
.epcan-form-field input:-webkit-autofill,
.epcan-form-field input:-webkit-autofill:hover,
.epcan-form-field input:-webkit-autofill:focus,
.epcan-form-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #000 !important;
    border: 1px solid #ddd !important;
}

/* Entferne alle Browser-Default Outlines und doppelte Borders */
.epcan-form-field input:focus {
    outline: none !important;
}

.epcan-form-field input:disabled:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
}

/* === LOADING STATES === */
.epcan-select-loading {
    position: relative;
    pointer-events: none;
}

.epcan-select-loading::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e3e3e3;
    border-top: 2px solid #004D9F;
    border-radius: 50%;
    animation: epcan-spin 0.6s linear infinite;
    z-index: 10;
}

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

/* === BUTTON STYLES === */
.epcan-form-field .btn {
    width: 100% !important;
    height: 48px !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.epcan-form-field .btn-orange {
    background: #F1800E !important;
    color: white !important;
}

.epcan-form-field .btn-orange:hover:not(:disabled) {
    background: #d8720d !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(241, 128, 14, 0.3) !important;
}

.epcan-form-field .btn-orange:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Button Loading State */
.epcan-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

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

/* === RESULTS CONTAINER === */
.epcan-results-container {
    margin-top: 20px;
}

.epcan-address-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.epcan-change-address {
    color: #007bff !important;
    text-decoration: none !important;
    background-color: transparent !important;
    margin-left: 10px;
}

.epcan-change-address:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
    cursor: pointer;
}

.epcan-result-heading {
    text-align: center;
    margin-bottom: 20px;
}

.epcan-result-heading h1 {
    font-weight: bold;
    margin-bottom: 10px;
}

.epcan-result-buttons {
    text-align: center;
    padding-top: 20px;
}

.epcan-result-buttons .btn {
    margin: 5px;
}

.epcan-status-display {
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* === BUSINESS MODE === */
.epcan-check-container[data-mode="business"] {
    border: 2px solid #004D9F;
    border-radius: 10px;
}

.epcan-check-container[data-mode="business"] .epcan-start-heading {
    background: linear-gradient(135deg, #004D9F, #0066CC);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
}

.epcan-check-container[data-mode="business"] .epcan-start-heading h2 {
    color: white;
    margin: 0;
}

/* === TARIF CONTAINER === */
.epcan-tarif-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.epcan-region-tile {
    width: 75%;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.epcan-region-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.epcan-tile {
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.epcan-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.epcan-tile-image {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.epcan-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.epcan-tile-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.epcan-tile h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    word-wrap: break-word;
    color: #1b304d;
}

.epcan-tile-price {
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.epcan-book-btn {
    margin-top: 10px;
    width: 100%;
}

.epcan-upgrade-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.epcan-upgrade-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #1b304d;
    font-size: 14px;
}

.epcan-upgrade-btn {
    width: 100%;
}

/* Additional Button Classes */
.epcan-check-container .btn-orange-inverted {
    color: #F1800E;
    background-color: #FFFFFF;
    border-color: #F1800E;
}

.epcan-check-container .btn-orange-inverted:hover {
    color: #fff;
    background-color: #d8720d;
    border-color: #d8720d;
}

.epcan-check-container .btn-blue {
    color: #fff !important;
    background-color: #004D9F;
    border-color: #004D9F;
}

.epcan-check-container .btn-blue:hover {
    color: #fff;
    background-color: #02458d;
    border-color: #02458d;
}

.epcan-check-container .btn-blue.disabled, 
.epcan-check-container .btn-blue:disabled {
    color: #fff;
    background-color: #34669b;
    border-color: #34669b;
}

/* Tile Specific Styles */
.epcan-tile-business {
    border-color: #004D9F;
}

.epcan-tile-business .epcan-tile-content h3 {
    color: #004D9F;
}

.epcan-tile-gestattung {
    border-color: #6c757d;
}

.epcan-tile-gestattung .epcan-tile-content h3 {
    color: #6c757d;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .epcan-check-container {
        padding: 15px;
    }
    
    .epcan-form-row-split {
        flex-direction: column;
        gap: 12px;
    }
    
    .epcan-tarif-container {
        flex-direction: column;
        align-items: center;
    }
    
    .epcan-tile {
        max-width: 100% !important;
        width: 100%;
        margin: 10px 0;
    }
    
    .epcan-region-tile {
        width: 100% !important;
        padding: 15px;
    }
    
    .epcan-tile .btn {
        width: 100%;
        white-space: normal;
        word-wrap: break-word;
        height: auto;
        min-height: 44px;
        padding: 10px 15px;
        line-height: 1.4;
        margin: 5px 0;
    }
    
    .epcan-result-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

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

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

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

/* === KACHEL STYLES (aus old-styles.css) === */
#resultIOR {
    display: none;
    text-align: center;
    padding-top: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.tile {
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-grow: 1; 
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.tile h2 {
    font-size: 18px;
    font-weight: bold;
    padding-top: 16px;
    word-wrap: break-word;
}

.tile img.thumbnail-image {
    width: 116%;
    max-width:116%!important;
    margin-left: -20px;
    margin-top: -20px;
    border-radius: 15px 0 0;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: top;
}

.content-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.btn-buchen {
    margin-top: 10px;
}

.price {
    font-weight: bold;
}

.upgradeLabel {
    padding-top: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Button Styles */
.btn-orange {
    color: #fff;
    background-color: #F1800E;
    border-color: #F1800E;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-orange:hover {
    color: #fff;
    background-color: #d8720d;
    border-color: #d8720d;
}

.btn-orange.disabled, .btn-orange:disabled {
    color: #fff;
    background-color: #F1800E;
    border-color: #F1800E;
}

.btn-orange-inverted {
    color: #F1800E;
    background-color: #FFFFFF;
    border-color: #F1800E;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-orange-inverted:hover {
    color: #fff;
    background-color: #d8720d;
    border-color: #d8720d;
}

.btn-blue {
    color: #fff !important;
    background-color: #004D9F;
    border-color: #004D9F;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-blue:hover {
    color: #fff;
    background-color: #02458d;
    border-color: #02458d;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 6px;
}

.btn-md {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
}

/* OPR Tile Styles */
.opr-tile {
    max-width: 500px !important;
}

.opr-image {
    height: 200px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .tile {
        max-width: 100% !important;
        margin: 10px 0;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .opr-tile {
        width: 100% !important;
        padding: 15px;
    }

    .tile .content-container {
        padding: 0 10px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .tile .btn {
        width: 100%;
        white-space: normal;
        word-wrap: break-word;
        height: auto;
        min-height: 44px;
        padding: 10px 15px;
        line-height: 1.4;
        margin: 5px 0;
    }

    #resultIOR {
        padding: 10px;
        gap: 15px;
    }

    .buttonContainer {
        margin-top: auto;
        width: 100%;
    }
}

/* === PRINT STYLES === */
@media print {
    .epcan-loader-container,
    .epcan-check-btn {
        display: none !important;
    }
}