/**
 * DHVC Form Turnstile - Styles
 */

/* Turnstile container */
.dhvc-form-turnstile-container {
    margin: 15px 0;
    padding: 10px 0;
    clear: both;
    display: block;
    width: 100%;
}

/* Widget wrapper */
.dhvc-form-turnstile-widget {
    display: block;
    min-height: 65px;
}

/* Ensure iframe is properly sized */
.dhvc-form-turnstile-widget iframe {
    display: block !important;
}

/* Error state */
.dhvc-form-turnstile-container.dhvc-form-turnstile-error {
    border-left: 3px solid #e74c3c;
    padding-left: 15px;
}

/* Error message */
.dhvc-form-turnstile-container .dhvc-form-error {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
}

/* Loading state */
.dhvc-form-turnstile-widget:empty {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dhvc-form-turnstile-widget:empty::after {
    content: 'Loading security check...';
    color: #999;
    font-size: 13px;
}

.dhvc-form-turnstile-widget:not(:empty)::after {
    display: none;
}

.dhvc-form-turnstile-widget:not(:empty) {
    background: none;
    border: none;
}

/* Responsive */
@media (max-width: 767px) {
    .dhvc-form-turnstile-widget {
        transform-origin: left center;
    }
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    .dhvc-form-turnstile-widget:empty {
        background: #333;
        border-color: #555;
    }
    
    .dhvc-form-turnstile-widget:empty::after {
        color: #aaa;
    }
}

/* Make sure it doesn't overlap other elements */
.dhvc-form-turnstile-container + .dhvc-form-group,
.dhvc-form-turnstile-container + div {
    clear: both;
}
