/* ==========================================================================
   1. GRID LAYOUT & SPALTEN
   ========================================================================== */
.ebook-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
}

.form-main-column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-sidebar-column {
    width: 360px;
    position: sticky;
    top: 90px; /* Bleibt beim Scrollen im Blick */
}

/* ==========================================================================
   2. FORMULAR SEKTIONEN & ELEMENTE
   ========================================================================== */
.form-section {
    padding: 25px;
    margin: 0;
    border-top: 4px solid var(--primary-gold);
}

.form-section h2 {
    color: var(--primary-blue);
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.section-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.hidden-box {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: rgba(0, 51, 78, 0.03);
    border-left: 3px solid var(--primary-gold);
    border-radius: 4px;
}

/* Checkboxen & Toggles */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.toggle-item label {
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0; 
    accent-color: var(--primary-gold);
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-group label {
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    line-height: 1.4;
}

/* ==========================================================================
   3. DATEIUPLOAD & VORSCHAU
   ========================================================================== */
.file-upload-box {
    border: 2px dashed #ccc;
    padding: 25px 15px;
    text-align: center;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-box:hover, 
.file-upload-box.dragover {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.05);
}

.file-upload-box input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.preview-container {
    margin-top: 10px;
}

.doc-preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 51, 78, 0.05);
    border: 1px solid rgba(0, 51, 78, 0.1);
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    color: var(--primary-blue);
}

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

.cover-preview-frame {
    width: 200px;
    aspect-ratio: 1 / 1.6;
    border: 3px solid var(--primary-gold);
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #eee;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-preview-frame img,
.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.btn-remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #d9534f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    z-index: 10;
}

.btn-remove-file:hover {
    transform: scale(1.1);
}

.doc-preview-card .btn-remove-file {
    position: static;
}

/* ==========================================================================
   4. KALKULATION & E-READER SIMULATOR
   ========================================================================== */
.price-calculator-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}

.total-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-blue);
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.chapter-inputs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

/* eReader Live Vorschau */
.ereader-simulator {
    background: #333;
    padding: 15px 10px 25px 10px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 320px;
    position: relative;
}

.ereader-simulator::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: #555;
    border-radius: 4px;
}

.ereader-screen {
    background: #fdfcf9;
    height: 380px;
    border-radius: 4px;
    padding: 20px;
    overflow: hidden;
    color: #111;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.ereader-screen h3 {
    text-align: center;
    font-size: 1.6rem;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: normal;
}

.ereader-screen p {
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
    margin-bottom: 10px;
}

.preview-dropcap {
    float: left;
    font-size: 3.2rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 6px;
    padding-left: 3px;
}

.preview-bold-start {
    font-weight: bold;
}

.preview-divider {
    text-align: center;
    margin: 15px 0;
    font-size: 1.2rem;
    color: #555;
    letter-spacing: 2px;
}

/* ==========================================================================
   5. MOBILE ANPASSUNGEN (LIGHT & DARK)
   ========================================================================== */
@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    .input-row .form-group {
        margin-bottom: 15px;
    }
    .form-sidebar-column {
        width: 100%;
        position: static;
    }
}


/* ==========================================================================
   6. DARK MODE OVERRIDES (eBook Formular, Kalkulation & Modal-Previews)
   ========================================================================== */

/* Dateiupload Boxen */
body.dark-mode .file-upload-box {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .file-upload-box:hover, 
body.dark-mode .file-upload-box.dragover {
    border-color: var(--primary-gold) !important;
    background: rgba(212, 175, 55, 0.1) !important;
}

body.dark-mode .file-upload-box strong[style*="color:var(--primary-blue)"] {
    color: var(--primary-gold) !important;
}

body.dark-mode .file-upload-box span[style*="color:#666"] {
    color: #b0c4de !important;
}

/* Vorschau Bilder & Dokumente */
body.dark-mode .doc-preview-card,
body.dark-mode .cover-preview-frame,
body.dark-mode .image-preview-item {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark-mode .doc-preview-card { color: var(--primary-gold) !important; }

/* Calculator Card */
body.dark-mode .price-calculator-card {
    background: linear-gradient(135deg, rgba(30, 40, 50, 0.85) 0%, rgba(20, 25, 30, 0.90) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .price-calculator-card h3 {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--primary-gold) !important;
}

body.dark-mode .price-calculator-card .calc-row,
body.dark-mode .price-calculator-card label span[style*="color:#555"],
body.dark-mode .price-calculator-card p[style*="color:#888"] {
    color: #b0c4de !important;
}

body.dark-mode .price-calculator-card .calc-row strong,
body.dark-mode .price-calculator-card .total-price-row,
body.dark-mode .price-calculator-card label[style*="color:var(--primary-blue)"] {
    color: var(--primary-gold) !important;
}

body.dark-mode .price-calculator-card .total-price-row,
body.dark-mode .price-calculator-card hr {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .price-calculator-card div[style*="background: #f9f9f9"] {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #b0c4de !important;
    border-left-color: var(--primary-gold) !important;
}

body.dark-mode .price-calculator-card div[style*="background: rgba(212,175,55,0.1)"] {
    background: rgba(212, 175, 55, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

/* FAQ Container & Akkordeon */
body.dark-mode .card-style[style*="background: var(--card-bg, #ffffff)"] {
    background: linear-gradient(135deg, rgba(30, 40, 50, 0.85) 0%, rgba(20, 25, 30, 0.90) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .js-toggle-faq {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .js-toggle-faq > div:first-child {
    color: var(--primary-gold) !important; 
}

body.dark-mode .js-toggle-faq .faq-answer {
    color: #b0c4de !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* --------------------------------------------------------------------------
   Modal Zusammenfassung / JS-generierte Inline-Styles bereinigen
   -------------------------------------------------------------------------- */
body.dark-mode #modalContent div[style*="background: #f9f9f9"],
body.dark-mode #modalContent div[style*="background:#f9f9f9"],
body.dark-mode #modalContent div[style*="background: #fafafa"],
body.dark-mode #modalContent div[style*="background:#fafafa"],
body.dark-mode #modalContent div[style*="background: rgba(0,51,78,0.03)"],
body.dark-mode #modalContent div[style*="background:rgba(0,51,78,0.03)"],
body.dark-mode #modalContent div[style*="background: #fff"],
body.dark-mode #modalContent div[style*="background:#fff"],
body.dark-mode #modalContent div[style*="background-color: #fff"],
body.dark-mode #modalContent div[style*="background-color:#fff"],
body.dark-mode #modalContent div[style*="rgba(0,51,78,0.05)"],
body.dark-mode #modalContent div[style*="rgba(0, 51, 78, 0.05)"],
body.dark-mode #modalContent div[style*="background: #f2f6f9"],
body.dark-mode #modalContent div[style*="background:#f2f6f9"],
body.dark-mode #modalContent div[style*="background-color: #f2f6f9"],
body.dark-mode #modalContent div[style*="background: #f0f4f8"],
body.dark-mode #modalContent div[style*="background: #f8f9fa"],
body.dark-mode #modalContent div[style*="background:#f4f7f9"],
body.dark-mode #modalContent div[style*="background: #f4f7f9"],
body.dark-mode .hidden-box {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #b0c4de !important;
}

/* Modal Überschriften & Labels */
body.dark-mode #modalContent strong[style*="color:var(--primary-blue)"],
body.dark-mode #modalContent strong[style*="color: var(--primary-blue)"],
body.dark-mode #modalContent span[style*="color:var(--primary-blue)"],
body.dark-mode #modalContent span[style*="color: var(--primary-blue)"],
body.dark-mode #modalContent h3[style*="color:var(--primary-blue)"],
body.dark-mode #modalContent h3[style*="color: var(--primary-blue)"] {
    color: var(--primary-gold) !important;
}

/* lato-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/lato-v25-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/montserrat-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('/assets/fonts/montserrat-v31-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* playfair-display-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/playfair-display-v40-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* playfair-display-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  src: url('/assets/fonts/playfair-display-v40-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* playfair-display-600italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 600;
  src: url('/assets/fonts/playfair-display-v40-latin-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* merriweather-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url('/assets/fonts/merriweather-v33-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* merriweather-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/merriweather-v33-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


