/* ==========================================================================
   Fingrade Modal Component (.fg-modal)
   ========================================================================== */

.fg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fg-modal {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fgModalFadeIn 0.2s ease-out;
}

.fg-modal--wide {
    max-width: 768px !important;
}

@keyframes fgModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.fg-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--black-100);
    flex-shrink: 0;
}

.fg-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--black-900);
    margin: 0;
}

.fg-modal__close {
    background-color: transparent;
    border: none;
    font-size: 20px;
    color: var(--black-400);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}

.fg-modal__close:hover {
    color: var(--black-900);
}

.fg-modal__form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fg-modal__content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 0;
}

.fg-modal-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--black-900);
    margin: 0 0 16px 0;
}

.fg-modal-divider {
    height: 1px;
    background-color: var(--black-100);
    margin: 20px 0;
}

.fg-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--black-100);
    background-color: var(--white);
    flex-shrink: 0;
}
