/* WebPDV modal effect layer
   Mantem o layout padrao dos modais e aplica apenas fundo, sombra e entrada. */

:root {
    --webpdv-modal-backdrop-color: rgba(15, 23, 42, .58);
    --webpdv-modal-backdrop: linear-gradient(180deg, rgba(15, 23, 42, .56), rgba(15, 23, 42, .56)), radial-gradient(circle at 50% 45%, rgba(148, 163, 184, .16), rgba(15, 23, 42, .12) 62%, rgba(15, 23, 42, .20) 100%);
    --webpdv-modal-backdrop-filter: blur(4px) saturate(108%);
    --webpdv-modal-shadow: 0 30px 90px rgba(15, 23, 42, .22);
    --webpdv-modal-radius: 26px;
}

.modal-backdrop.show,
.modal-backdrop.in {
    opacity: 1 !important;
    background: var(--webpdv-modal-backdrop) !important;
    background-color: var(--webpdv-modal-backdrop-color) !important;
    backdrop-filter: var(--webpdv-modal-backdrop-filter);
    -webkit-backdrop-filter: var(--webpdv-modal-backdrop-filter);
}

.modal-backdrop,
.modal-backdrop.show,
.modal-backdrop.in {
    z-index: 2050 !important;
}

.modal,
.modal.show,
.modal.in {
    z-index: 2060 !important;
}

.modal.fade .modal-dialog {
    transition: transform .18s ease, opacity .18s ease;
}

.modal.show .modal-dialog,
.modal.in .modal-dialog {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal.show .modal-content,
.modal.in .modal-content {
    box-shadow: var(--webpdv-modal-shadow);
}

.swal-overlay {
    background: var(--webpdv-modal-backdrop) !important;
    background-color: var(--webpdv-modal-backdrop-color) !important;
    backdrop-filter: var(--webpdv-modal-backdrop-filter) !important;
    -webkit-backdrop-filter: var(--webpdv-modal-backdrop-filter) !important;
}

.swal-modal {
    width: min(560px, calc(100vw - 32px));
    border: 0;
    border-radius: 28px;
    box-shadow: var(--webpdv-modal-shadow);
    padding: 32px 42px 28px;
    animation: webpdvSwalScale .18s ease;
}

.swal-icon {
    border-width: 4px !important;
    transform: scale(.92);
}

.swal-title {
    color: #2b2b2b;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 12px;
    margin-top: 10px;
}

.swal-text {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 440px;
    text-align: center;
}

.swal-footer {
    margin-top: 24px;
    text-align: center;
}

.swal-button.swal-button--confirm {
    background: #2f6fed !important;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(47, 111, 237, .22);
    font-weight: 800;
    min-width: 68px;
}

.swal-button.swal-button--confirm:hover {
    background: #1e5fe0 !important;
}

.swal2-container {
    z-index: 2147483647 !important;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: var(--webpdv-modal-backdrop) !important;
    background-color: var(--webpdv-modal-backdrop-color) !important;
    backdrop-filter: var(--webpdv-modal-backdrop-filter);
    -webkit-backdrop-filter: var(--webpdv-modal-backdrop-filter);
}

.swal2-popup:not(.swal2-toast) {
    border-radius: 28px !important;
    box-shadow: var(--webpdv-modal-shadow) !important;
    padding: 32px 42px 28px !important;
    width: min(560px, calc(100vw - 32px)) !important;
    animation: webpdvSwalScale .18s ease !important;
}

.swal2-popup:not(.swal2-toast) .swal2-title {
    color: #2b2b2b;
    font-size: 34px !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    max-width: 440px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.swal2-popup:not(.swal2-toast) .swal2-html-container {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    max-width: 440px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.swal2-popup:not(.swal2-toast) .swal2-confirm {
    background: #2f6fed !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 24px rgba(47, 111, 237, .22) !important;
    font-weight: 800 !important;
    min-width: 68px;
}

@media (max-width: 575.98px) {
    .swal-modal,
    .swal2-popup:not(.swal2-toast) {
        padding: 28px 24px 24px !important;
        width: calc(100vw - 28px) !important;
    }

    .swal-title,
    .swal2-popup:not(.swal2-toast) .swal2-title {
        font-size: 28px !important;
    }

    .swal-text,
    .swal2-popup:not(.swal2-toast) .swal2-html-container {
        font-size: 15px;
    }
}

@keyframes webpdvSwalScale {
    from {
        opacity: 0;
        transform: scale(.92) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* PDV action/table modals */
.pdv-modal-polished .modal-content {
    background: #f6f8fb;
    border: 0;
    border-radius: 24px;
    box-shadow: var(--webpdv-modal-shadow);
    overflow: hidden;
}

.pdv-modal-polished .pdv-modal-polished-header {
    align-items: center;
    border: 0;
    display: flex;
    min-height: 64px;
    padding: 17px 24px;
}

.pdv-modal-table .pdv-modal-polished-header.bg-primary,
.pdv-modal-table .pdv-modal-polished-header.bg-primary.text-white {
    background: linear-gradient(135deg, #4254ba 0%, #5367dd 100%) !important;
    color: #fff !important;
}

.pdv-modal-action-danger .pdv-modal-polished-header.bg-danger {
    background: linear-gradient(135deg, #ff453f 0%, #ff7477 100%) !important;
}

.pdv-modal-action-success .pdv-modal-polished-header.bg-success {
    background: linear-gradient(135deg, #1aaea4 0%, #13c7a6 100%) !important;
}

.pdv-modal-polished .modal-title {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.pdv-modal-polished .btn-close {
    background-color: rgba(255, 255, 255, .16);
    border-radius: 14px;
    height: 38px;
    margin: 0;
    opacity: .85;
    padding: 0;
    transition: background-color .18s ease, opacity .18s ease, transform .18s ease;
    width: 38px;
}

.pdv-modal-polished .btn-close:hover {
    background-color: rgba(255, 255, 255, .25);
    opacity: 1;
    transform: rotate(90deg);
}

.pdv-modal-polished .modal-body {
    background: #f6f8fb;
    padding: 24px 28px 28px;
}

.pdv-modal-table .table-responsive {
    background: #fff;
    border: 1px solid #e5ebf4;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    overflow: auto;
}

.pdv-modal-table .table {
    margin-bottom: 0;
}

.pdv-modal-table .table thead th {
    background: #fff;
    border-bottom: 1px solid #edf1f7;
    color: #748192;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    padding: 16px 18px;
    text-transform: uppercase;
}

.pdv-modal-table .table tbody td {
    border-color: #eef2f7;
    color: #2f3744;
    font-size: 14px;
    padding: 16px 18px;
}

.pdv-modal-table .table tbody tr {
    transition: background-color .16s ease;
}

.pdv-modal-table .table tbody tr:hover {
    background: #f8fafc;
}

.pdv-modal-table .table tbody td[colspan] {
    color: #4b5563;
    padding: 28px 18px !important;
    text-align: center;
}

.pdv-modal-table .btn {
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    min-height: 38px;
    padding: 8px 14px;
}

.pdv-modal-table .btn-danger {
    background: #ff7477;
    box-shadow: 0 10px 20px rgba(255, 116, 119, .20);
}

.pdv-modal-table .btn-primary,
.pdv-modal-table .btn-secondary,
.pdv-modal-table .btn-dark {
    background: #4c5878;
    box-shadow: 0 10px 20px rgba(76, 88, 120, .18);
}

.pdv-modal-table .form-label,
.pdv-modal-action .form-label {
    color: #2f3744;
    font-weight: 700;
    margin-bottom: 8px;
}

.pdv-modal-table .form-control,
.pdv-modal-action .form-control,
.pdv-modal-action .form-select,
.pdv-modal-action .input-group-text {
    background-color: #fff;
    border-color: #dbe3ee;
    border-radius: 12px;
    color: #26364a;
    min-height: 46px;
}

.pdv-modal-action .input-group .input-group-text {
    border-radius: 12px 0 0 12px;
}

.pdv-modal-action .input-group .form-control {
    border-radius: 0 12px 12px 0;
}

.pdv-modal-table .form-control:focus,
.pdv-modal-action .form-control:focus,
.pdv-modal-action .form-select:focus {
    border-color: #4254ba;
    box-shadow: 0 0 0 4px rgba(66, 84, 186, .10);
}

.pdv-modal-action .modal-dialog {
    max-width: 620px;
}

.pdv-modal-action textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.pdv-modal-action .modal-body .row {
    row-gap: 10px;
}

.pdv-modal-action .btn[type="submit"] {
    align-items: center;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    font-weight: 900;
    gap: 7px;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.pdv-modal-action-danger .btn[type="submit"] {
    background: #ff7477;
    box-shadow: 0 12px 26px rgba(255, 116, 119, .22);
}

.pdv-modal-action-success .btn[type="submit"] {
    background: #13c7a6;
    box-shadow: 0 12px 26px rgba(19, 199, 166, .22);
}

@media (max-width: 767.98px) {
    .pdv-modal-polished .modal-content {
        border-radius: 20px;
    }

    .pdv-modal-polished .pdv-modal-polished-header {
        padding: 15px 18px;
    }

    .pdv-modal-polished .modal-body {
        padding: 18px;
    }

    .pdv-modal-table .table thead th,
    .pdv-modal-table .table tbody td {
        padding: 13px 14px;
    }

    .pdv-modal-action .btn[type="submit"] {
        width: 100%;
    }
}
