/* Form Message Styles */

/* Form Messages */
.form-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-message p {
    margin: 0;
    flex-grow: 1;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.form-message.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid #F44336;
}

/* Captcha Container */
.captcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Hide LastPass and other password manager icons */
input[data-lpignore="true"]::-webkit-credentials-auto-fill-button,
input[autocomplete="off"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

/* Additional selectors for hiding browser extension icons */
input[data-lpignore="true"]::-ms-reveal,
input[autocomplete="off"]::-ms-reveal,
input[data-lpignore="true"]::-ms-clear,
input[autocomplete="off"]::-ms-clear {
    display: none !important;
}

/* Form Progress Indicator */
.form-progress {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-progress p {
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

/* Spinner animation */
.progress-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(199, 178, 153, 0.3);
    border-radius: 50%;
    border-top-color: #c7b299; /* --accent-color */
    animation: spin 1s ease-in-out infinite;
}

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

/* Form state when disabled */
form:has(:disabled) {
    opacity: 0.8;
    position: relative;
}

/* Dismiss button for messages */
.message-dismiss {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
    padding: 0 0 0 10px;
    margin: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.message-dismiss:hover {
    opacity: 1;
}

/* No hand cursor on success messages */
.form-message.success {
    cursor: default;
}

/* Message animation */
.form-message {
    transition: opacity 0.5s ease-out;
}

.form-message.fade-out {
    opacity: 0;
}