/**
 * IYH Contact Form Styles
 * 
 * Styles for the [iyh_contact] shortcode
 */

.iyh-contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.iyh-contact-form-title {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

.iyh-form-group {
    margin-bottom: 20px;
}

.iyh-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.iyh-form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.iyh-form-control:focus {
    outline: none;
    border-color: #FEEC02;
    box-shadow: 0 0 0 2px rgba(254, 236, 2, 0.2);
}

.iyh-form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.iyh-submit-btn {
    background-color: #FEEC02;
    color: #000;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    position: relative;
}

.iyh-submit-btn:hover {
    background-color: #e6d102;
    transform: translateY(-1px);
}

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

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

.iyh-submit-btn:disabled:hover {
    background-color: #ccc;
}

.required {
    color: #e74c3c;
    font-weight: normal;
}

.iyh-error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    background-color: #fff5f5;
    padding: 5px 8px;
    border-radius: 3px;
    border-left: 3px solid #e74c3c;
}

.iyh-error-message.show {
    display: block;
}

.iyh-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.iyh-error-message-general {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    border-left: 4px solid #dc3545;
    font-weight: 500;
}

.iyh-form-messages {
    margin-top: 20px;
}

.iyh-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.iyh-btn-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: iyh-spinner 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .iyh-contact-form-wrapper {
        padding: 15px;
        margin: 0 10px;
        box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    }
    
    .iyh-contact-form-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .iyh-form-group {
        margin-bottom: 15px;
    }
    
    .iyh-form-control {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .iyh-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .iyh-contact-form-wrapper {
        padding: 10px;
        margin: 0 5px;
        border-radius: 4px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .iyh-contact-form-wrapper {
        background: #2d2d2d;
        color: #fff;
        box-shadow: 0 2px 10px rgba(255,255,255,0.1);
    }
    
    .iyh-contact-form-title,
    .iyh-form-label {
        color: #fff;
    }
    
    .iyh-form-control {
        background-color: #3d3d3d;
        border-color: #555;
        color: #fff;
    }
    
    .iyh-form-control:focus {
        border-color: #FEEC02;
        background-color: #3d3d3d;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .iyh-form-control {
        border-width: 3px;
    }
    
    .iyh-submit-btn {
        border: 3px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .iyh-form-control,
    .iyh-submit-btn {
        transition: none;
    }
    
    @keyframes iyh-spinner {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}
