.ai-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
}

/* Modal Content */
.ai-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
    box-sizing: border-box;
    margin: 0 auto;  /* Ensure it centers horizontally */
    display: block;
}

/* Close Button */
.ai-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.ai-modal-close:hover,
.ai-modal-close:focus {
    color: #333;
    text-decoration: none;
}

/* Responsive Textarea */
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin-bottom: 10px;
    resize: vertical;
}

/* Buttons */
button {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    font-size: 16px;
    color: #fff;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:focus {
    outline: none;
}

/* Flash Message */
.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 20px;
    color: #fff;
    background-color: #4CAF50;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 16px;
}

.loading-indicator {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #333;
    font-size: 16px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #09f;
  animation: spin 1s linear infinite;
}

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

/* Add this to center the logo in the modal footer */
.modal-footer {
    display: flex;
    justify-content: right;
    align-items: right;
    margin-top: 25px; /* Add some space between the buttons and the logo */
}

.modal-logo {
    max-width: 120px; /* Adjust size as necessary */
    height: auto;
}

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

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

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .ai-modal-content {
        width: 100%;
        padding: 15px;
    }
}
