:root {
    --brand-blue: #004980;
    --brand-green: #19BA5D;
    --brand-bg: #d0d0d0;
}

[x-cloak] { display: none; }

.error-border { border: 2px solid #dc2626; }

.error-focus:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .3);
}

.normal-border { border: 1px solid #ccc; }

.normal-focus:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .1);
    border-color: #f9f9f9;
}

.iti { width: 100%; }

.iti__selected-flag {
    background: var(--brand-bg);
    border: 1px solid var(--brand-bg);
    border-radius: 9999px;
    padding: 2px 6px 2px 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}

.iti__selected-flag:hover { background: rgba(25, 186, 93, .1); }

.iti__selected-dial-code {
    color: var(--brand-blue);
    font-weight: 300;
    letter-spacing: .5px;
    font-family: "DM Sans";
}

.iti__dial-code {
    font-family: "DM Sans";
    color: #d0d0d0;
}

.iti__flag {
    border-radius: 9999px;
    box-shadow: 0 0 0 1px rgb(0 0 0 / .08);
}

.iti__arrow {
    width: 10px;
    height: 10px;
    margin-left: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' fill='%23192B5D'%3E%3Cpath d='M7 8 0 0h14L7 8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.iti__country-list {
    border: 1px solid var(--brand-bg);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    z-index: 100000 !important;
}

.iti__country-name {
    font-family: "DM Sans";
    color: var(--brand-blue);
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: rgba(25, 186, 93, .15);
}

.success-overlay { z-index: 100; }

.hr-popup-overlay {
    align-items: flex-end;
    overscroll-behavior: contain;
    padding: 0;
}

.hr-popup-sheet {
    width: 100%;
    max-width: none;
    max-height: min(94dvh, 100vh);
    border-radius: 28px 28px 0 0;
    padding: 18px 22px max(22px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
}

.hr-popup-success-panel {
    border-radius: 28px 28px 0 0;
    padding: 28px 28px max(28px, env(safe-area-inset-bottom));
}

.hr-popup-enter,
.hr-popup-leave {
    transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}

.hr-popup-enter-start,
.hr-popup-leave-end {
    opacity: 0;
    transform: translateY(100%);
}

.hr-popup-enter-end,
.hr-popup-leave-start {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .hr-popup-overlay {
        align-items: center;
        padding: 1rem;
    }

    .hr-popup-sheet {
        max-width: 32rem;
        max-height: 90vh;
        border-radius: 1rem;
        padding: 1.5rem;
    }

    .hr-popup-success-panel {
        border-radius: 1rem;
        padding: 2.5rem;
    }

    .hr-popup-enter-start,
    .hr-popup-leave-end {
        transform: translateY(12px) scale(.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hr-popup-enter,
    .hr-popup-leave {
        transition: opacity .01ms linear;
    }

    .hr-popup-enter-start,
    .hr-popup-leave-end,
    .hr-popup-enter-end,
    .hr-popup-leave-start {
        transform: none;
    }
}

.popup-scroll::-webkit-scrollbar { width: 6px; }
.popup-scroll::-webkit-scrollbar-track { background: transparent; }
.popup-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}
.popup-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.iti--container { z-index: 100000 !important; }
.iti__country-list { z-index: 100000 !important; }
