/* Odaline Creator Form - Frontend Styles */

/* Form Wrapper & Quiz Overlay */
.ocf-form-wrapper {
    position: relative;
}

.ocf-quiz-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: none;
    cursor: not-allowed;
}

/* Hide elements until quiz is solved */
.ocf-hide-until-quiz-solved {
    display: none !important;
}

.ocf-form {
}

.ocf-form-fields {
    margin-bottom: 20px;
}

/* Flex-Zeilen fuer nebeneinander platzierte Felder */
.ocf-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ocf-form-row > .ocf-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.ocf-field {
    margin-bottom: 20px;
}

.ocf-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.ocf-required-mark {
    color: #d63638;
    margin-left: 3px;
}

.ocf-input,
.ocf-textarea,
.ocf-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.ocf-input:focus,
.ocf-textarea:focus,
.ocf-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.ocf-textarea {
    resize: vertical;
    min-height: 100px;
}

.ocf-radio-group,
.ocf-checkbox-group {
    padding: 10px 0;
}

.ocf-radio-label,
.ocf-checkbox-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ocf-radio-label:hover,
.ocf-checkbox-label:hover {
    background-color: #f5f5f5;
}

.ocf-radio-label input[type="radio"],
.ocf-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.ocf-field-consent {
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
}

.ocf-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.ocf-consent-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

.ocf-consent-text {
    font-size: 14px;
    line-height: 1.5;
}

.ocf-consent-text a {
    color: #2271b1;
    text-decoration: underline;
}

.ocf-honeypot {
    position: absolute !important;
    left: -5000px !important;
}

.ocf-form-actions {
    text-align: center;
    margin-top: 30px;
}

.ocf-submit-button {
    display: inline-block;
    padding: 12px 30px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ocf-submit-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

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

.ocf-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.ocf-loading {
    display: inline-block;
    margin-left: 15px;
    color: #666;
}

.ocf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: ocf-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.ocf-messages {
    margin-top: 20px;
}

.ocf-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: ocf-fadeIn 0.3s;
}

@keyframes ocf-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ocf-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ocf-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* E-Mail-Bestätigung: Zwei Felder nebeneinander */
.ocf-email-confirm-row {
    display: flex;
    gap: 20px;
}

.ocf-email-confirm-col {
    flex: 1;
    min-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ocf-form {
        padding: 15px;
    }

    .ocf-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ocf-form-row > .ocf-field {
        margin-bottom: 20px;
    }

    .ocf-form-row > .ocf-field:last-child {
        margin-bottom: 0;
    }

    .ocf-input,
    .ocf-textarea,
    .ocf-select {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    .ocf-submit-button {
        width: 100%;
    }

    .ocf-email-confirm-row {
        flex-direction: column;
        gap: 0;
    }

    .ocf-email-confirm-col {
        margin-bottom: 20px;
    }

    .ocf-email-confirm-col:last-child {
        margin-bottom: 0;
    }
}

/* Feldvalidierung Styles */
.ocf-input.was-touched:invalid,
.ocf-textarea.was-touched:invalid,
.ocf-select.was-touched:invalid {
    border-color: #d63638;
}

.ocf-input.was-touched:valid,
.ocf-textarea.was-touched:valid,
.ocf-select.was-touched:valid {
    /*border-color: #00a32a;*/
}

/* Accessibility */
.ocf-input:focus-visible,
.ocf-textarea:focus-visible,
.ocf-select:focus-visible,
.ocf-submit-button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}