/**
 * TCR WP Contact Form - Frontend Styles
 *
 * Farbpalette TCRserver:
 * - Orange:      #FF7300
 * - Dunkelblau:  #003470
 * - Hellblau:    #6EC1E4
 * - Grau:        #555555
 * - Hintergrund: #EAF2F8
 */

.tcr-contact-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333333;
    line-height: 1.5;
}

.tcr-contact-container *,
.tcr-contact-container *::before,
.tcr-contact-container *::after {
    box-sizing: border-box;
}

/* Alerts */
.tcr-contact-alert {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
}

.tcr-contact-alert--success {
    background-color: #EAF2F8;
    border-left: 5px solid #003470;
    color: #003470;
}

.tcr-contact-alert--error {
    background-color: #fdf2f2;
    border-left: 5px solid #d93838;
    color: #901c1c;
}

.tcr-contact-alert--warning {
    background-color: #fef9e7;
    border-left: 5px solid #FF7300;
    color: #7d5100;
}

.tcr-contact-alert__title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: inherit;
}

.tcr-contact-alert p {
    margin: 0 0 8px 0;
}

.tcr-contact-alert p:last-child {
    margin-bottom: 0;
}

.tcr-contact-alert__ref {
    margin-top: 12px !important;
    font-size: 16px;
}

.tcr-contact-badge {
    display: inline-block;
    background-color: #003470;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

.tcr-contact-hidden {
    display: none !important;
}

/* Honeypot field - visually hidden and untabbable */
.tcr-contact-hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Form fields */
.tcr-contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tcr-contact-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tcr-contact-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #003470;
    margin-bottom: 6px;
}

.tcr-contact-required {
    color: #FF7300;
    margin-left: 2px;
}

.tcr-contact-input,
.tcr-contact-select,
.tcr-contact-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.tcr-contact-input:focus,
.tcr-contact-select:focus,
.tcr-contact-textarea:focus {
    outline: none;
    border-color: #6EC1E4;
    box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.35);
}

.tcr-contact-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkbox */
.tcr-contact-field--checkbox {
    flex-direction: row;
    align-items: flex-start;
}

.tcr-contact-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #555555;
    cursor: pointer;
    line-height: 1.4;
}

.tcr-contact-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #003470;
    flex-shrink: 0;
}

.tcr-contact-checkbox-label a {
    color: #003470;
    text-decoration: underline;
}

.tcr-contact-checkbox-label a:hover {
    color: #FF7300;
}

/* Error states */
.tcr-contact-field--error .tcr-contact-input,
.tcr-contact-field--error .tcr-contact-select,
.tcr-contact-field--error .tcr-contact-textarea {
    border-color: #d93838;
    background-color: #fffafa;
}

.tcr-contact-field--error .tcr-contact-input:focus,
.tcr-contact-field--error .tcr-contact-select:focus,
.tcr-contact-field--error .tcr-contact-textarea:focus {
    box-shadow: 0 0 0 3px rgba(217, 56, 56, 0.25);
}

.tcr-contact-error-msg {
    display: block;
    font-size: 13px;
    color: #d93838;
    margin-top: 5px;
    font-weight: 500;
}

/* Turnstile Container */
.tcr-contact-turnstile-wrapper {
    min-height: 65px;
    display: flex;
    align-items: center;
}

/* Submit Button */
.tcr-contact-field--submit {
    margin-top: 8px;
}

.tcr-contact-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FF7300;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
    text-align: center;
    min-height: 48px;
    min-width: 160px;
    font-family: inherit;
}

.tcr-contact-submit-btn:hover {
    background-color: #e06500;
}

.tcr-contact-submit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 115, 0, 0.4);
}

.tcr-contact-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .tcr-contact-container {
        padding: 0 8px;
    }

    .tcr-contact-submit-btn {
        width: 100%;
    }
}
