/* ==============================================================
    # Contact Form Custom Styles
=================================================================== */

/* Alert Error Messages */
.alert-error {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    animation: shake 0.3s ease-in-out;
}

/* Alert Notification Box */
.alert-notification {
    margin-top: 20px;
}

.alert-msg {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 15px;
    display: none;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-msg.alert-success {
    background: linear-gradient(135deg, #28e98c 0%, #1abc9c 100%);
    color: #ffffff;
    border-left: 5px solid #16a085;
}

.alert-msg.alert-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    border-left: 5px solid #a93226;
}

/* Form Control Focus States */
.contact-form .form-control:focus {
    border-color: #28e98c;
    box-shadow: 0 0 0 0.2rem rgba(40, 233, 140, 0.25);
}

.contact-form .form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

/* Required Field Indicator */
.contact-form .form-control:required {
    border-left: 3px solid #28e98c;
}

.contact-form .form-control:required:invalid {
    border-left-color: #e74c3c;
}

/* Submit Button Loading State */
#submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#submit .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .alert-msg {
        font-size: 14px;
        padding: 12px 15px;
    }

    .alert-error {
        font-size: 12px;
    }
}

/* Form Field Validation Colors */
.contact-form input:valid,
.contact-form textarea:valid {
    border-color: #28e98c;
}

/* Placeholder Styling */
.contact-form .form-control::placeholder {
    color: #95a5a6;
    opacity: 0.8;
}

.contact-form .form-control:focus::placeholder {
    opacity: 0.5;
}

/* Success Checkmark Animation */
.alert-success::before {
    content: "✓";
    font-size: 20px;
    font-weight: bold;
    margin-right: 10px;
    display: inline-block;
    animation: bounceIn 0.5s ease-out;
}

/* Error Icon Animation */
.alert-danger::before {
    content: "✕";
    font-size: 20px;
    font-weight: bold;
    margin-right: 10px;
    display: inline-block;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form Group Styling */
.contact-form .form-group {
    position: relative;
    margin-bottom: 25px;
}

/* Textarea Specific */
.contact-form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Submit Button Hover Effect */
.contact-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 233, 140, 0.4);
}

.contact-form button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}
