/**
 * Osterall Contact Form Styles
 * 
 * Custom contact form styling that integrates
 * seamlessly with the Osterall theme.
 */

.osterall-contact-form-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.osterall-contact-messages {
    margin-bottom: 2rem;
}

.osterall-contact-success,
.osterall-contact-error {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.osterall-contact-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.osterall-contact-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.osterall-contact-form {
    background: #fff;
    padding: 2rem 0 0 0;
}

.osterall-form-row {
    margin-bottom: 1.5rem;
}

.osterall-form-field {
    width: 100%;
}

.osterall-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 2rem;
}

.osterall-required {
    color: #dc3545;
    margin-left: 2px;
}

.osterall-field-input,
.osterall-field-textarea {
    width: 50%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 2rem;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.osterall-field-input:focus,
.osterall-field-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.osterall-field-input.error,
.osterall-field-textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.osterall-field-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot field - must be hidden */
.osterall-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Checkbox field styling */
.osterall-checkbox-field {
    display: flex;
    align-items: flex-start;
}

.osterall-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
    font-weight: normal;
}

.osterall-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
    transform: scale(1.2);
}

.osterall-checkbox-text {
    font-size: 0.9rem;
    color: #666;
}

.osterall-checkbox-text a {
    color: #007cba;
    text-decoration: none;
}

.osterall-checkbox-text a:hover {
    text-decoration: underline;
}

/* Submit button */
.osterall-submit-row {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 0;
}



.osterall-submit-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.osterall-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.3);
}

.osterall-submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.osterall-submit-text {
    transition: opacity 0.3s ease;
}

.osterall-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.osterall-submit-button.loading .osterall-submit-text {
    opacity: 0;
}

.osterall-submit-button.loading .osterall-loading-spinner {
    display: block;
}

/* Spinner animation */
.osterall-spinner-path {
    animation: osterall-spin 1.5s linear infinite;
}

@keyframes osterall-spin {
    0% {
        stroke-dashoffset: 31.416;
    }

    50% {
        stroke-dashoffset: 7.854;
    }

    100% {
        stroke-dashoffset: 31.416;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .osterall-contact-form {
        padding: 0;
        margin: 2rem 0 0 0;
    }

    .osterall-submit-button {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .osterall-contact-form {
        padding: 0;
        margin: 1.5rem;
    }

    .osterall-form-row {
        margin-bottom: 1.25rem;
    }

    .osterall-field-input,
    .osterall-field-textarea {
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }
}

/* Success state styling */
.osterall-contact-form.success {
    background: #f8f9fa;
    border-color: #28a745;
}

.osterall-contact-form.success .osterall-submit-button {
    background: #28a745;
}

.osterall-contact-form.success .osterall-submit-button:hover {
    background: #218838;
}

/* Error state styling */
.osterall-contact-form.error {
    border-color: #dc3545;
}

/* Focus management for accessibility */
.osterall-field-input:focus-visible,
.osterall-field-textarea:focus-visible,
.osterall-submit-button:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .osterall-field-input,
    .osterall-field-textarea {
        border-width: 3px;
    }

    .osterall-contact-success {
        border-width: 2px;
    }

    .osterall-contact-error {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .osterall-field-input,
    .osterall-field-textarea,
    .osterall-submit-button {
        transition: none;
    }

    .osterall-spinner-path {
        animation: none;
    }
}