/* Easy Web Rent - Global custom dialogs + country dropdown normalization */

:root {
    --ewr-dialog-primary: #0798d4;
    --ewr-dialog-primary-dark: #067eaf;
    --ewr-dialog-danger: #ef4444;
    --ewr-dialog-text: #17324d;
    --ewr-dialog-muted: #5f7285;
    --ewr-dialog-border: #d4e8f7;
}

body.ewr-dialog-open {
    overflow: hidden !important;
}

#ewr-global-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100000; /* Above the existing global page loader (999999). */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(20, 36, 50, 0.55);
    backdrop-filter: blur(1px);
}

#ewr-global-dialog-overlay.ewr-show {
    display: flex;
}

.ewr-global-dialog {
    width: min(470px, calc(100vw - 30px));
    max-height: calc(100vh - 36px);
    overflow: hidden;
    border: 1px solid var(--ewr-dialog-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    animation: ewrDialogIn .16s ease-out;
}

@keyframes ewrDialogIn {
    from { transform: translateY(8px) scale(.985); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.ewr-global-dialog-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--ewr-dialog-border);
    background: linear-gradient(135deg, #eef9ff, #ffffff);
}

.ewr-global-dialog-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #eaf8ff;
    color: var(--ewr-dialog-primary);
}

.ewr-global-dialog.ewr-danger .ewr-global-dialog-icon {
    background: #fff0f0;
    color: #d22f2f;
}

.ewr-global-dialog.ewr-warning .ewr-global-dialog-icon {
    background: #fff7e7;
    color: #e79a08;
}

.ewr-global-dialog-title {
    margin: 0;
    color: var(--ewr-dialog-text);
    font-size: 19px;
    line-height: 1.25;
    font-weight: 900;
}

.ewr-global-dialog-body {
    max-height: min(45vh, 320px);
    overflow: auto;
    padding: 20px;
    color: var(--ewr-dialog-muted);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 600;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ewr-global-dialog-input {
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    padding: 9px 12px;
    border: 1px solid #bdd9ec;
    border-radius: 10px;
    outline: none;
    color: var(--ewr-dialog-text);
    background: #fff;
}

.ewr-global-dialog-input:focus {
    border-color: var(--ewr-dialog-primary);
    box-shadow: 0 0 0 3px rgba(7, 152, 212, .12);
}

.ewr-global-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 20px 20px;
}

.ewr-global-dialog-btn {
    min-width: 112px;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #c8d9e7;
    padding: 8px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: .15s ease;
}

.ewr-global-dialog-btn:focus {
    outline: 3px solid rgba(7, 152, 212, .18);
    outline-offset: 1px;
}

.ewr-global-dialog-cancel {
    background: #fff;
    color: #44576a;
}

.ewr-global-dialog-cancel:hover {
    background: #f4f8fb;
}

.ewr-global-dialog-ok {
    border-color: var(--ewr-dialog-primary);
    background: var(--ewr-dialog-primary);
    color: #fff;
    box-shadow: 0 8px 16px rgba(7, 152, 212, .18);
}

.ewr-global-dialog-ok:hover {
    background: var(--ewr-dialog-primary-dark);
}

.ewr-global-dialog.ewr-danger .ewr-global-dialog-ok {
    border-color: var(--ewr-dialog-danger);
    background: var(--ewr-dialog-danger);
    box-shadow: 0 8px 16px rgba(239, 68, 68, .18);
}

/*
 * Any older page-level custom confirm can remain in the HTML, but the global
 * EWR dialog is rendered above it and the global capture handler prevents the
 * old handler from opening for .ewr-confirm-form / data-confirm forms.
 */
