/* --- Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Content --- */
.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 600px;
    transform: translateY(-30px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* --- Title & Text --- */
.modal-content h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
}

.modal-content p {
    margin: 0;
    line-height: 1.6;
    color: #444;
    font-size: 1rem;
}

/* --- Input Area --- */
#modal-textarea {
    display: block;
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: none !important;
    overflow: auto;
    word-wrap: break-word;
    word-break: break-all;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modal-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

/* --- Buttons --- */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal-buttons button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.modal-buttons button:active {
    transform: scale(0.97);
}

#modal-confirm-btn {
    background-color: var(--primary-color, #007bff);
    color: white;
}

#modal-confirm-btn:hover {
    background-color: #0056b3;
}

#modal-cancel-btn {
    background-color: #6c757d;
    color: white;
}

#modal-cancel-btn:hover {
    background-color: #5a6268;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}
