/**
 * JALZISCAA Contact Form Styles - Teal Theme - Compact Design
 * Common CSS for contact forms on both index.php and contact.php
 */

/* Contact Form Container */
.contact-form-container {
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #a7f3d0;
    margin-bottom: 20px;
}

/* Compact Form Styling */
.contact-form-container.compact {
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
    border: 1px solid #99f6e4;
    margin-bottom: 15px;
}

.contact-form-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: white;
}

/* Light Header Style */
.contact-form-header.light {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
    border: 1px solid #14b8a6;
    margin-bottom: 12px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.15);
}

.contact-form-header h3,
.contact-form-header h4 {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 1rem;
}

.contact-form-header.light h3,
.contact-form-header.light h4 {
    color: #ffffff;
}

.contact-form-header p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 12px;
}

.contact-form-header.light p {
    color: #ffffff;
    opacity: 0.9;
    font-size: 11px;
}

/* Form Group Styling */
.contact-form .form-group {
    margin-bottom: 12px;
    position: relative;
}

/* Compact Form Group Styling */
.contact-form-container.compact .form-group {
    margin-bottom: 10px;
}

.contact-form .form-label {
    font-weight: 500;
    color: #0d9488 !important;
    margin-bottom: 4px;
    display: block;
    font-size: 13px;
}

.contact-form .form-label .required {
    color: #dc3545;
    margin-left: 2px;
}

/* Form Controls */
.contact-form .form-control {
    border: 2px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    width: 100%;
}

/* Compact Form Controls */
.contact-form-container.compact .form-control {
    border: 1px solid #99f6e4;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.95);
}

.contact-form .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.15rem rgba(20, 184, 166, 0.2);
    background-color: #fff;
    outline: none;
}

.contact-form .form-control:hover {
    border-color: #6ee7b7;
}

/* Validation States */
.contact-form .form-control.is-valid {
    border-color: #14b8a6;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2314b8a6' d='m2.3 6.73.79.79 3.57-3.56-.79-.79-2.78 2.78L1.51 5.16l-.79.79z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.contact-form .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.5.7.7 1.5-1.5-.7-.7L5.8 4.5zm2.4 1.5-.7.7 1.5 1.5.7-.7-1.5-1.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.contact-form .form-control.is-warning {
    border-color: #ffc107;
    background-color: #fff3cd;
}

/* Feedback Messages */
.contact-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 3px;
    font-size: 11px;
    color: #dc3545;
    font-weight: 500;
}

.contact-form .warning-feedback {
    display: block;
    width: 100%;
    margin-top: 3px;
    font-size: 11px;
    color: #856404;
    font-weight: 500;
    background-color: #fff3cd;
    padding: 3px 6px;
    border-radius: 3px;
    border-left: 2px solid #ffc107;
}

/* Character Counters */
.char-counter {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.95);
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
}

.contact-form .form-group:has(textarea) .char-counter {
    top: auto;
    bottom: 6px;
    transform: none;
}

/* Textarea specific styling */
.contact-form textarea.form-control {
    resize: vertical;
    min-height: 70px;
    padding-right: 50px; /* Space for character counter */
}

.contact-form-container.compact textarea.form-control {
    min-height: 60px;
    padding-right: 45px;
}

/* Captcha Section */
.captcha-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    margin-bottom: 10px;
}

/* Compact Captcha Section */
.contact-form-container.compact .captcha-section {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.captcha-image {
    border: 1px solid #6ee7b7;
    border-radius: 3px;
    background: #fff;
    height: 35px;
}

.captcha-refresh {
    background: #0f766e;
    color: #fff;
    border: none;
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: background-color 0.3s ease;
}

.captcha-refresh:hover {
    background: #0d9488;
}

.captcha-input {
    flex: 1;
    min-width: 100px;
}

/* Submit Button */
.contact-form .btn-submit {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Compact Submit Button */
.contact-form-container.compact .btn-submit {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.contact-form .btn-submit:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(13, 148, 136, 0.25);
}

.contact-form .btn-submit:active {
    transform: translateY(0);
}

.contact-form .btn-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Animation */
.contact-form .btn-submit .fa-spinner {
    margin-right: 6px;
}

/* Form Footer */
.contact-form-footer {
    text-align: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #a7f3d0;
}

.contact-form-footer p {
    font-size: 10px;
    color: #0f766e;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 15px;
        margin: 10px;
        border-radius: 6px;
    }
    
    .contact-form-container.compact {
        padding: 12px;
        margin: 8px;
        border-radius: 5px;
    }
    
    .contact-form .form-control {
        padding: 8px 10px;
        font-size: 14px; /* Prevent zoom on iOS */
    }
    
    .contact-form-container.compact .form-control {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .contact-form-header.light {
        padding: 6px;
        margin-bottom: 10px;
    }
    
    .contact-form-header.light h4 {
        font-size: 0.95rem;
        margin-bottom: 2px;
        color: #ffffff;
    }
    
    .contact-form-header.light p.small {
        font-size: 10px;
        color: #ffffff;
        opacity: 0.9;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .captcha-section {
        padding: 4px 8px;
        margin-bottom: 8px;
    }
    
    .contact-form-container.compact .captcha-section {
        padding: 3px 6px;
        margin-bottom: 6px;
    }
    
    .captcha-image {
        align-self: center;
        height: 30px;
    }
    
    .char-counter {
        position: static;
        text-align: right;
        margin-top: 3px;
        transform: none;
        background: transparent;
        padding: 0;
        font-size: 9px;
    }
    
    .contact-form textarea.form-control {
        padding-right: 12px;
        min-height: 60px;
    }
    
    .contact-form-container.compact textarea.form-control {
        min-height: 50px;
    }
    
    .contact-form-container.compact .form-group {
        margin-bottom: 8px;
    }
    
    .contact-form-footer {
        margin-top: 8px;
        padding-top: 6px;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        margin: 8px;
        padding: 12px;
    }
    
    .contact-form-container.compact {
        margin: 5px;
        padding: 10px;
    }
    
    .contact-form-header.light h4 {
        font-size: 0.9rem;
    }
    
    .contact-form .btn-submit {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .contact-form-container.compact .btn-submit {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .contact-form .form-group {
        margin-bottom: 10px;
    }
    
    .contact-form-container.compact .form-group {
        margin-bottom: 7px;
    }
}

/* Print Styles */
@media print {
    .contact-form-container {
        box-shadow: none;
        border: 1px solid #000;
        padding: 10px;
    }
    
    .contact-form .btn-submit,
    .captcha-section,
    .char-counter {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .contact-form .form-control {
        border-width: 2px;
    }
    
    .contact-form .form-control:focus {
        border-color: #000;
        box-shadow: 0 0 0 2px #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .contact-form .form-control,
    .contact-form .btn-submit,
    .captcha-refresh {
        transition: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .contact-form-container {
        background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
        border-color: #14b8a6;
        color: #f0fdf4;
    }
    
    .contact-form-header.light {
        background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
        color: #f0fdf4;
        border-color: #14b8a6;
    }
    
    .contact-form .form-label {
        color: #f0fdf4;
    }
    
    .contact-form .form-control {
        background: #0d9488;
        border-color: #14b8a6;
        color: #f0fdf4;
    }
    
    .contact-form .form-control:focus {
        border-color: #5eead4;
        background: #0d9488;
    }
    
    .captcha-section {
        background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%);
        border-color: #14b8a6;
    }
    
    .char-counter {
        color: #a7f3d0;
        background: rgba(13, 148, 136, 0.8);
    }
    
    .contact-form-footer p {
        color: #a7f3d0;
    }
} 