/* Modal Styles */

.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show,
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.modal.show .modal-content,
.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--bg-default);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-4);
}

.modal-body p {
    margin: 0 0 var(--spacing-3) 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.modal-body a:hover {
    color: var(--primary-dark);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Text link button style for support button in footer */
.text-link {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.text-link:hover {
    color: var(--primary-color);
}
