/* Unified modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 8px;
    width: 400px;
    max-width: 90vw;
    box-shadow: var(--shadow);
    margin: 20px;
    border: 1px solid var(--border-color);
}

.modal-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Playfair Display SC', serif;
}

.modal-body {
    padding: 20px 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-light);
}

/* Form elements in modals */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Libre Baskerville', serif;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .modal-content {
        width: 95vw;
        margin: 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
}
