.rponto-modal {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(520px, calc(100% - 32px));
    max-width: 520px;
    max-height: min(90vh, 600px);
    overflow: auto;
    margin: auto;
    padding: 26px;
    border: 1px solid #d1dde9;
    border-radius: 14px;
    color: #132b47;
    background: #fff;
    box-shadow: 0 18px 56px #102b4633;
    opacity: 0;
    transform: translateY(8px) scale(.99);
    transition: opacity 160ms ease, transform 160ms ease;
}

.rponto-modal[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rponto-modal::backdrop {
    background: #0b213988;
}

.rponto-modal__header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-right: 30px;
}

.rponto-modal__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f1fc;
    color: #1768c4;
    font: 700 20px/1 Georgia, serif;
}

.rponto-modal__title {
    margin: 4px 0 0;
    color: #132b47;
    font-size: 21px;
    line-height: 1.35;
}

.rponto-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #596b7e;
    cursor: pointer;
    font: inherit;
    font-size: 25px;
    line-height: 1;
}

.rponto-modal__content {
    margin-top: 16px;
}

.rponto-modal__message {
    margin: 0;
    color: #435971;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.rponto-modal__input {
    display: block;
    width: 100%;
    min-height: 104px;
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #b8c6d5;
    border-radius: 9px;
    color: #132b47;
    background: #fff;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.rponto-modal__input:focus-visible,
.rponto-modal__close:focus-visible,
.rponto-modal__button:focus-visible {
    outline: 3px solid #8ab9f1;
    outline-offset: 3px;
}

.rponto-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.rponto-modal__button {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.rponto-modal__button--secondary {
    border-color: #cbd6e1;
    color: #29425d;
    background: #f5f8fb;
}

.rponto-modal__button--primary {
    border-color: #238e56;
    color: #fff;
    background: #2c9c61;
}

.rponto-modal--warning .rponto-modal__icon {
    background: #fff3d7;
    color: #a86600;
}

.rponto-modal--danger .rponto-modal__icon {
    background: #fde9e8;
    color: #b42318;
}

.rponto-modal--danger .rponto-modal__button--primary {
    border-color: #a61b1b;
    background: #bd2929;
}

body.rponto-verification-page .rponto-modal__button--verification-success {
    border-color: var(--verification-action-green);
    color: #fff;
    background: var(--verification-action-green);
}

body.rponto-verification-page .rponto-modal__button--verification-success:hover {
    background: var(--verification-action-green-hover);
    border-color: var(--verification-action-green-hover);
}

.rponto-modal__close:hover { background: #eef3f8; }
.rponto-modal__button--secondary:hover { background: #eaf0f6; }
.rponto-modal__button--primary:hover { filter: brightness(.94); }

@media (max-width: 600px) {
    .rponto-modal {
        width: calc(100% - 24px);
        max-height: min(88vh, 600px);
        padding: 22px 18px;
        border-radius: 12px;
    }

    .rponto-modal__title { font-size: 19px; }
    .rponto-modal__message { font-size: 14px; }
    .rponto-modal__actions { gap: 8px; }
    .rponto-modal__button { min-height: 44px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .rponto-modal { transition: none; transform: none; }
}
