@charset "utf-8";

.sja-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.sja-modal.is-open {
    display: flex;
}

.sja-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.sja-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    font-family: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
}

.sja-modal__header {
    flex-shrink: 0;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #eef2f7;
}

.sja-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sja-modal__close:hover {
    background: #e2e8f0;
    color: #1a1a2e;
}

.sja-modal__title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1a1a2e;
}

.sja-modal__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

.sja-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.sja-modal__rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sja-row {
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e8edf4;
    border-radius: 12px;
}

.sja-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sja-row__num {
    font-size: 13px;
    font-weight: 700;
    color: #1f5afc;
    letter-spacing: -0.02em;
}

.sja-row__remove {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.sja-row__remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

.sja-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.sja-field:last-child {
    margin-bottom: 0;
}

.sja-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: -0.02em;
}

.sja-field__label em {
    color: #1f5afc;
    font-style: normal;
}

.sja-field__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.sja-field__input:focus {
    outline: none;
    border-color: #1f5afc;
    box-shadow: 0 0 0 3px rgba(31, 90, 252, 0.12);
}

.sja-field__input::placeholder {
    color: #94a3b8;
}

.sja-modal__add {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.sja-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px dashed #c7d5e8;
    border-radius: 30px;
    background: #fff;
    color: #1f5afc;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sja-btn-add:hover {
    border-color: #1f5afc;
    background: #f3f6ff;
}

.sja-modal__footer {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
    border-top: 1px solid #eef2f7;
}

.sja-btn-submit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border: none;
    border-radius: 30px;
    background: #1f5afc;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(31, 90, 252, 0.22);
}

.sja-btn-submit:hover:not(:disabled) {
    background: #1748cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(31, 90, 252, 0.28);
}

.sja-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.sja-btn-cancel {
    flex-shrink: 0;
    height: 48px;
    padding: 0 20px;
    border: 1px solid #dbe3ee;
    border-radius: 30px;
    background: #fff;
    color: #64748b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.sja-btn-cancel:hover {
    border-color: #94a3b8;
    color: #334155;
}

.sja-modal__note {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    text-align: center;
}

body.sja-modal-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .sja-modal__header,
    .sja-modal__body,
    .sja-modal__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .sja-modal__title {
        font-size: 20px;
        padding-right: 36px;
    }

    .sja-modal__footer {
        flex-direction: column-reverse;
    }

    .sja-btn-cancel {
        width: 100%;
    }
}
