/* === VERTRAG SPEZIFISCHE STYLES === */

/* Email Section */
.email-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--grau-hell);
    border-radius: 8px;
}

.email-input {
    flex: 0 0 400px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Oswald', sans-serif;
}

.email-input:focus {
    outline: none;
    border-color: var(--gelb-warm);
}

/* === VERTRAGSVORLAGE (Brief-Design) === */
.vertrag-vorlage {
    max-width: 21cm;
    margin: 40px auto;
    padding: 2.5cm 2.5cm 2cm 2.5cm;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 29.7cm;
    font-family: 'Oswald', sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    position: relative;
}

/* Header mit Logo */
.vertrag-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.vertrag-titel {
    flex: 1;
}

.vertrag-titel h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 16pt;
    font-weight: 600;
    color: var(--anthrazit);
    margin-bottom: 10px;
    line-height: 1.3;
}

.vertrag-logo {
    flex: 0 0 auto;
    margin-left: 20px;
}

.vertrag-logo img {
    max-width: 120px;
    height: auto;
}

/* Bandname Dropdown */
.bandname-select {
    display: inline-block;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 2px 25px 2px 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 11pt;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
}

.bandname-select:focus {
    outline: none;
    border-bottom: 2px solid var(--gelb-warm);
    background-color: #fffef0;
}

/* Vertragsparteien */
.vertragsparteien {
    margin-bottom: 30px;
}

.partei-block {
    margin-bottom: 25px;
}

.partei-label {
    font-weight: 600;
    color: var(--anthrazit);
    margin-bottom: 5px;
}

.partei-info {
    margin-left: 20px;
    line-height: 1.8;
}

.partei-info-line {
    margin-bottom: 3px;
}

/* Inline Inputs */
.inline-input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 2px 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 11pt;
    background-color: transparent;
    min-width: 200px;
}

.inline-input-small {
    min-width: 150px;
}

.inline-input-medium {
    min-width: 250px;
}

.inline-input-large {
    min-width: 350px;
}

.inline-input-number {
    min-width: 80px;
    text-align: right;
}

.inline-input-tiny {
    min-width: 40px;
    width: 40px;
    text-align: center;
}

.inline-input:focus,
.bandname-select:focus {
    outline: none;
    border-bottom: 2px solid var(--gelb-warm);
    background-color: #fffef0;
}

/* Inline Dropdown */
.inline-select {
    display: inline-block;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 2px 25px 2px 5px;
    font-family: 'Oswald', sans-serif;
    font-size: 11pt;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
    min-width: 150px;
}

.inline-select:focus {
    outline: none;
    border-bottom: 2px solid var(--gelb-warm);
    background-color: #fffef0;
}

/* Grayed Out (deaktiviert) */
.grayed-out {
    color: #999 !important;
    opacity: 0.5;
}

.grayed-out input,
.grayed-out select {
    color: #999 !important;
    border-bottom-color: #ddd !important;
    pointer-events: none;
}

/* Paragraphen */
.paragraph {
    margin-bottom: 25px;
}

.paragraph-title {
    font-family: 'Oswald', sans-serif;
    font-size: 12pt;
    font-weight: 600;
    color: var(--anthrazit);
    margin-bottom: 15px;
}

.paragraph-content {
    line-height: 1.8;
}

.paragraph-item {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}

/* Checkbox links vom Buchstaben */
.paragraph-checkbox {
    position: absolute;
    left: -28px;
    top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.paragraph-text {
    flex: 1;
}

.paragraph-label {
    font-weight: 600;
    margin-right: 5px;
    min-width: 20px;
}

/* Radio Buttons für §2c */
.radio-group {
    margin: 15px 0;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    cursor: pointer;
}

.radio-option label {
    flex: 1;
    cursor: pointer;
    line-height: 1.8;
}

/* Sub-Checkbox für §2c */
.sub-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 10px 30px;
}

.sub-checkbox {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    cursor: pointer;
}

/* Veranstaltungsdetails Tabelle */
.veranstaltung-details {
    margin: 20px 0;
    line-height: 2;
}

.detail-row {
    display: flex;
    margin-bottom: 5px;
}

.detail-label {
    font-weight: 600;
    min-width: 180px;
    flex: 0 0 auto;
}

.detail-value {
    flex: 1;
}

/* Gage-Berechnung */
.gage-berechnung {
    margin: 15px 0;
    line-height: 2;
}

.gage-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.gage-label {
    flex: 0 0 auto;
    margin-right: 10px;
}

.gage-value {
    font-weight: 600;
    color: var(--gelb-warm);
}

/* Gage Zweizeilig */
.gage-zweizeilig {
    display: block;
    margin-top: 5px;
}

/* Verpflegung Checkboxen */
.verpflegung-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 5px;
}

.verpflegung-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    vertical-align: middle;
}

/* Page Break für Druck */
.page-break {
    page-break-before: always;
    margin-top: 50px;
    padding-top: 30px;
}

/* Unterschriften Block */
.unterschriften-block {
    margin-top: 50px;
}

.unterschriften-zeile-row {
    display: flex;
    gap: 60px;
    align-items: flex-end;
    margin-bottom: 40px;
}

.unterschrift-seite {
    flex: 1;
}

.unterschrift-zeile {
    position: relative;
}

.unterschrift-linie {
    border-bottom: 1px solid #333;
    width: 100%;
    padding-top: 50px;
    margin-bottom: 5px;
}

.unterschrift-label {
    font-size: 10pt;
    color: #666;
    display: block;
    text-align: center;
}

.unterschrift-datum-text {
    font-size: 11pt;
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 0;
}

.unterschrift-datum-linie {
    border-bottom: 1px solid #333;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 5px;
}

.unterschrift-bild-container {
    position: relative;
    text-align: center;
}

.unterschrift-bild {
    display: block;
    margin: 0 auto;
    max-width: 180px;
    height: auto;
    transform: translateY(-50%);
}

.unterschrift-bild-linie {
    border-bottom: 1px solid #333;
    width: 100%;
    margin-top: -10px;
    margin-bottom: 5px;
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin: 40px 0;
    clear: both;
}

.btn-large {
    padding: 15px 50px;
    font-size: 1.2rem;
}

/* Loading Overlay */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--gelb-warm);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Success Message */
#successMessage {
    display: none;
    position: fixed;
    top: 90px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .vertrag-vorlage {
        padding: 1.5cm 1cm;
    }
    
    .vertrag-header {
        flex-direction: column;
    }
    
    .vertrag-logo {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .unterschriften-zeile-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .page-title,
    .email-section,
    .submit-section {
        display: none !important;
    }
    
    .vertrag-vorlage {
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 2.5cm 2.5cm 2cm 2.5cm;
    }
    
    body {
        background-color: white;
    }
    
    .inline-input,
    .inline-select,
    .bandname-select {
        border-bottom: none !important;
        background-color: transparent !important;
        background-image: none !important;
    }
    
    .paragraph-checkbox,
    .sub-checkbox,
    .verpflegung-checkbox {
        display: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    .grayed-out {
        display: none !important;
    }
}

/* FORCE FIX für Submit Button */
.content-container {
    display: block !important;
    width: 100% !important;
}

.vertrag-vorlage {
    display: block !important;
    float: none !important;
    width: 21cm !important;
    max-width: 100% !important;
}

.submit-section {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
    text-align: center !important;
    margin: 40px auto !important;
}