/* Contact Form CSS - TuliPink */

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem 1.25rem;
    color: inherit;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    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.6 1.4 1.4-1.4 1.4'/%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);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    display: block;
    font-weight: 500;
}

/* Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    display: none;
}

.btn-loading.active {
    display: inline-block;
}

.btn-text.hidden {
    display: none;
}

/* Loading Spinner */
.fa-spinner {
    animation: contactSpinner 1s linear infinite;
}

@keyframes contactSpinner {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Form Focus States */
.contact-form .form-control:focus {
    border-color: var(--pink-color);
    box-shadow: 0 0 0 0.2rem rgba(54, 88, 113, 0.25);
}

.contact-form .form-control:valid {
    border-color: #28a745;
}

.contact-form .form-control:valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Form Animation */
.contact-form {
    transition: all 0.3s ease;
}

.contact-form.submitting {
    opacity: 0.9;
    pointer-events: none;
}

/* Message Animation */
.alert.fade.show {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Icon Animation */
.fa-check-circle {
    animation: checkCircle 0.5s ease-out;
}

@keyframes checkCircle {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error Icon Animation */
.fa-exclamation-triangle {
    animation: exclamationTriangle 0.3s ease-out;
}

@keyframes exclamationTriangle {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(-2px);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(2px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px;
        font-size: 13px;
    }
    
    .alert-dismissible .btn-close {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* TuliPink Branding Colors */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid var(--pink-color);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

/* Contact Form Loading Overlay */
.contact-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.contact-form-overlay.active {
    display: flex;
}

.contact-form-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--pink-color);
    border-radius: 50%;
    animation: contactSpinner 1s linear infinite;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #767571;
    text-align: right;
    margin-top: 5px;
    font-weight: 500;
}

.char-counter.text-danger {
    color: #dc3545;
    font-weight: 600;
}