/* Form Messages */
.form-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.3s ease-in-out forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.alert i {
    margin-right: 10px;
    font-size: 1.2em;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert .close {
    margin-left: auto;
    color: inherit;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0 0 15px;
}

.alert .close:hover {
    opacity: 1;
}

/* Form Loading State */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form Validation */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #fff8f8;
    border-radius: 4px;
    display: block;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    z-index: 10;
}

.form-group.has-error .error-message {
    opacity: 1;
    transform: translateY(0);
}

/* Focus states */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group.has-error .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    
    .alert i {
        font-size: 1em;
    }
}

/* Dark Mode Support */
.dark-mode .alert-success {
    color: #d4edda;
    background-color: #155724;
    border-color: #0f5132;
}

.dark-mode .alert-error {
    color: #f8d7da;
    background-color: #842029;
    border-color: #842029;
}

.dark-mode .alert .close {
    text-shadow: 0 1px 0 #000;
}
