/* Button Styling */
button.button-with-spinner {
    position: relative;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 150px; /* Ensure the button doesn't shrink when text is hidden */
}

button.button-with-spinner:hover {
    background-color: #333;
}

/* Spinner Styling (Inside Button) */
button.button-with-spinner .spinner {
    border: 3px solid #f3f3f3; /* Light grey */
    border-top: 3px solid #fff; /* White */
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and Error Messages */
.form-message {
    position: relative;
    margin: 20px auto; /* Center horizontally */
    text-align: center; /* Center the text */
    font-size: 18px; /* Make the text larger */
    padding: 20px 30px; /* Add more padding for better spacing */
    border-radius: 8px; /* Round the edges for a polished look */
    display: inline-block;
    max-width: 600px; /* Limit the width */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    animation: fadeIn 0.5s ease-in-out; /* Smooth fade-in effect */
}

/* Success Styling */
.form-message.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb; /* Green border */
}

/* Error Styling */
.form-message.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Red border */
}

/* Fade-In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px); /* Start slightly above */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* Settle into position */
    }
}
