/* css/modal.css */

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    /* Removed default display: flex; - it was overriding display: none; */
}

.modal.show { /* New class to show the modal */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color-darker);
    margin: auto;
    padding: 20px;
    border: 1px solid var(--input-border);
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.close-modal-btn {
    color: var(--text-color-secondary);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: var(--text-color);
    text-decoration: none;
}

.modal-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
}

.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 1em;
}

.caption-modal-categories-section {
  margin-top: 20px;
  margin-bottom: 20px;
  border-top: 1px solid var(--input-border);
  padding-top: 15px;
}

.caption-modal-categories-section h5 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-color-secondary);
}

.category-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-checkboxes label {
  margin-left: 5px;
}

.modal-actions {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.modal-actions button.secondary {
    background-color: transparent;
    color: var(--text-color-secondary);
    border: 1px solid var(--input-border);
}
.modal-actions button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-actions button:not(.secondary) {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}
.modal-actions button:not(.secondary):hover {
    background-color: var(--primary-color-darker);
}

/* User Profile Modal Specifics */
.user-profile-modal-content {
    text-align: center;
}

.profile-header {
    margin-bottom: 20px;
}

.profile-avatar-modal {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 10px;
}

.profile-bio-text {
    color: var(--text-color-secondary);
    line-height: 1.6;
    font-size: 0.95em;
    text-align: left;
}

/* Profile Contact Options */
.profile-contact-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--input-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center; /* Center buttons */
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    width: 100%;
    max-width: 250px; /* Limit width for larger screens */
    box-sizing: border-box;
}

.whatsapp-btn {
    background-color: #25D366; /* WhatsApp Green */
    color: white;
}

.whatsapp-btn:hover {
    background-color: #1DA851;
}

.contact-btn i {
    font-size: 1.2em;
}
