/**
 * Contact Form Styles
 * Includes validation styles and modal popup
 */

/* Form Validation Styles */
.form-clt input.error,
.form-clt textarea.error,
.form-clt select.error {
    border-color: #ff8700 !important;
    background-color: #fff5f5;
}

.form-clt input.success,
.form-clt textarea.success,
.form-clt select.success {
    border-color: #28a745 !important;
    background-color: #f0fff4;
}

span.error-message {
    display: block;
    color: #ff8700 !important;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Modal Styles */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.contact-modal.show {
    opacity: 1;
    visibility: visible;
}

.contact-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.contact-modal .modal-content {
    position: relative;
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    z-index: 1;
}

.contact-modal.show .modal-content {
    transform: scale(1);
}

.contact-modal .modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-modal .modal-icon {
    color: #28a745;
}

.error-modal .modal-icon {
    color: #ff8700;
}

.contact-modal h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

.success-modal h3 {
    color: #28a745;
}

.error-modal h3 {
    color: #ff8700;
}

.contact-modal p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.contact-modal .modal-close-btn {
    background: linear-gradient(135deg, #1CA8CB 0%, #FFA31A 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(28, 168, 203, 0.3);
}

.contact-modal .modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 168, 203, 0.4);
}

.contact-modal .modal-close-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.contact-modal .modal-close-btn:hover i {
    transform: translateX(5px);
}

/* Button Loading State */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button[type="submit"] .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .contact-modal .modal-content {
        padding: 30px 20px;
    }

    .contact-modal .modal-icon {
        font-size: 60px;
    }

    .contact-modal h3 {
        font-size: 24px;
    }

    .contact-modal p {
        font-size: 14px;
    }

    .contact-modal .modal-close-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* Additional Form Enhancements */
.form-clt input:focus,
.form-clt textarea:focus,
.form-clt select:focus {
    outline: none;
    border-color: #1CA8CB;
    box-shadow: 0 0 0 3px rgba(28, 168, 203, 0.1);
}

.form-clt {
    position: relative;
}

/* Character counter for textarea */
.char-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: #999;
}

/* Select Box Styling to Match Input Fields */
.contact-us-section-2 .form-clt select,
.contact-us-section-2 .form-clt .nice-select {
    width: 100%;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.contact-us-section-2 .form-clt select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
    padding-right: 50px;
}

.contact-us-section-2 .form-clt select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.contact-us-section-2 .form-clt select option {
    background: #0a2a35;
    color: white;
    padding: 10px;
}

/* Nice Select Plugin Styling Override */
.contact-us-section-2 .form-clt .nice-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.5;
    height: auto;
}

.contact-us-section-2 .form-clt .nice-select:after {
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    right: 25px;
}

.contact-us-section-2 .form-clt .nice-select .current {
    color: rgba(255, 255, 255, 0.7);
}

.contact-us-section-2 .form-clt .nice-select .list {
    background: #0a2a35;
    border-radius: 15px;
    margin-top: 5px;
}

.contact-us-section-2 .form-clt .nice-select .option {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
}

.contact-us-section-2 .form-clt .nice-select .option:hover,
.contact-us-section-2 .form-clt .nice-select .option.focus,
.contact-us-section-2 .form-clt .nice-select .option.selected.focus {
    background-color: rgba(28, 168, 203, 0.3);
    color: white;
}

.contact-us-section-2 .form-clt .nice-select.open .list {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Placeholder styling for select */
.contact-us-section-2 .form-clt select:invalid {
    color: rgba(255, 255, 255, 0.5);
}
