/* style.css */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    
    background-image: url('hintergrund-pattern.png');
    background-repeat: repeat;
    opacity: 0.05;
    z-index: -1;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Arial", sans-serif;
    background-color: #f4f6f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex-grow: 1;
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.logo {
    width: 180px;
    height: auto;
}

.contact-info {
    font-size: 14px;
    text-align: left;
    line-height: 1.5;
}

.contact-info p {
    margin: 4px 0;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.editor-column {
    order: 1;
}

.preview-column {
    order: 2;
}

.form-and-date-column {
    order: 3;
}

.form-and-date-column,
.editor-column,
.preview-column {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    font-size: 1.4em;
    color: #34495e;
    margin: 0 0 10px 0;
    text-align: left;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.form-container label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    text-align: left;
}

.form-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 16px;
}

.date-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-container h2 {
    text-align: center;
    width: 100%;
}

#selected-dates {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.selected-date {
    background-color: #e0f2f7;
    color: #1c313a;
    padding: 6px 12px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.delete-date {
    color: #e53935;
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
}

.ql-toolbar.ql-snow {
    border: 1px solid #ccc;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
#editor {
    min-height: 200px;
    border: 1px solid #ccc;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
}

.button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

button, .column-button {
    padding: 12px 18px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #3498db;
    color: white;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
}

button:hover, .column-button:hover {
    background-color: #2980b9;
}

button:active, .column-button:active {
    transform: translateY(1px);
}

.price-container {
    text-align: left;
}

.price-container p {
    margin: 5px 0;
}

#erscheinungen-text, #price {
    font-size: 1.2em;
    font-weight: bold;
}

#price {
    font-size: 1.5em;
    color: #27ae60;
}

.calculation {
    margin-top: 10px;
}

#discount-text {
    font-size: 0.9em;
    line-height: 1.3;
    color: #555;
    font-weight: normal;
}

#pdf-viewer-container {
    width: 100%;
    border: 1px solid #ccc;
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    display: none; /* Wird per JS eingeblendet */
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    overflow: auto;
}

#pdf-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


#downloadPdfButton, #payWithStripeButton {
    margin-top: 10px;
}

#payWithStripeButton {
    background-color: #6772E5;
}
#payWithStripeButton:hover {
    background-color: #5562d2;
}

#payment-message {
    color: red;
    margin-top: 10px;
    font-weight: bold;
}

.site-footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}

.site-footer a {
    color: #3498db;
    text-decoration: none;
    margin: 0 10px;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .button-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .main-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .editor-column {
        flex: 2 1 500px;
        order: 1;
    }

    .form-and-date-column {
        flex: 1 1 380px;
        order: 2;
    }

    .preview-column {
        flex: 1 1 380px;
        order: 3;
    }
    
    .holiday-notice {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 15px;
    }
}