/**
 * Angebot Formular Styles
 * Theme-Farben: Gold #C19A6B, Dunkel #1a1a1a
 */

/* ============================================
   FORMULAR WRAPPER
   ============================================ */

.angebot-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background-color: rgba(44, 44, 44, 0.5);
    border-radius: 12px;
}

.angebot-form {
    width: 100%;
}

/* ============================================
   FORM GROUPS - Kompaktes 2-Spalten-Layout
   ============================================ */

.form-group {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

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

.form-col-6 {
    width: 100%;
}

/* Einzelne Felder (volle Breite) */
.form-group:not(.form-col-6) {
    margin-bottom: 1.25rem;
}

/* ============================================
   LABELS
   ============================================ */

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.required {
    color: var(--color-primary, #C19A6B);
    font-weight: 700;
}

.optional {
    color: #999;
    font-weight: 400;
    font-size: 0.85rem;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* ============================================
   FORM CONTROLS (Input, Select, Textarea)
   ============================================ */

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(193, 154, 107, 0.3);
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary, #C19A6B);
    background-color: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.1);
}

.form-control::placeholder {
    color: #666;
}

/* Textarea specific */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Select specific */
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23C19A6B' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   FILE UPLOAD
   ============================================ */

.file-upload-btn-wrapper {
    margin-top: 1rem;
}

.file-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(193, 154, 107, 0.2);
    border: 2px dashed var(--color-primary, #C19A6B);
    border-radius: 6px;
    color: var(--color-primary, #C19A6B);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.file-select-btn:hover {
    background-color: rgba(193, 154, 107, 0.3);
    border-color: #B8860B;
    color: #B8860B;
}

.file-count {
    font-size: 0.85rem;
    opacity: 0.8;
}

.form-file {
    display: none;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exakt 3 Spalten */
    gap: 1rem;
    margin-top: 1rem;
}

.upload-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(193, 154, 107, 0.3);
    background: rgba(26, 26, 26, 0.5);
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-preview-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.375rem;
    font-size: 0.7rem;
    color: #FFF;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.upload-preview-item .remove-file {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    background: rgba(244, 67, 54, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 10;
}

.upload-preview-item .remove-file:hover {
    background: rgba(244, 67, 54, 1);
    transform: scale(1.1);
}

/* ============================================
   CHECKBOX (Datenschutz)
   ============================================ */

.form-checkbox {
    margin: 2rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    color: #CCCCCC;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary, #C19A6B);
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--color-primary, #C19A6B);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #B8860B;
}

/* ============================================
   SUBMIT BUTTON - Gleiche Farben wie Navi-Button
   ============================================ */

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--color-primary, #C19A6B);
    color: #2C2C2C;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-submit:hover {
    background-color: #A67C52;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 154, 107, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background-color: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline;
}

/* ============================================
   MESSAGES (Success/Error)
   ============================================ */

.form-messages {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-messages.success {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.form-messages.error {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
    color: #F44336;
}

/* ============================================
   FOOTER TEXT
   ============================================ */

.form-footer-text {
    text-align: center;
    margin-top: 1rem;
    color: #999;
}

/* ============================================
   VALIDATION STATES
   ============================================ */

.form-control:invalid:not(:placeholder-shown) {
    border-color: rgba(244, 67, 54, 0.5);
}

.form-control:valid:not(:placeholder-shown) {
    border-color: rgba(76, 175, 80, 0.5);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .angebot-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    /* Auf Mobile: 1 Spalte */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .btn-submit {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    /* Upload Preview auf Mobile - 2 Spalten für bessere Nutzung */
    .upload-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .angebot-form-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.75rem 0.875rem;
    }
}

