:root {
    --limgo-room-blue: #2456d8;
    --limgo-room-blue-dark: #1d49bd;
    --limgo-room-blue-soft: #edf3ff;
    --limgo-room-green: #00a86b;
    --limgo-room-green-soft: #eaf9f3;
    --limgo-room-ink: #14213d;
    --limgo-room-muted: #667085;
    --limgo-room-border: #dce3ec;
}

/* Limgo room sharing */

.limgo-share-options {
    display: grid;
    gap: 10px;
    margin: 18px 0 4px;
}

.limgo-share-option {
    display: flex;
    gap: 13px;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--limgo-room-border);
    border-radius: 14px;
    color: var(--limgo-room-ink);
    background: #ffffff;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.limgo-share-option:hover {
    border-color: #b9c9f7;
    color: var(--limgo-room-ink);
    box-shadow: 0 8px 22px rgba(20, 33, 61, 0.09);
    transform: translateY(-1px);
}

.limgo-share-option > i,
.limgo-max-mark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
}

.limgo-share-option > i {
    color: var(--limgo-room-blue);
    background: var(--limgo-room-blue-soft);
    font-size: 17px;
}

.limgo-max-mark {
    color: #ffffff;
    background: linear-gradient(135deg, #6657ff 0%, #3678ff 52%, #17b9ef 100%);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.limgo-share-option span:last-child {
    display: grid;
    gap: 3px;
}

.limgo-share-option strong {
    font-size: 13px;
    font-weight: 800;
}

.limgo-share-option small {
    color: var(--limgo-room-muted);
    font-size: 11px;
    line-height: 1.35;
}

/* Limgo pre-join device preview */

.swal2-container.swal2-backdrop-show:has(.init-modal-size) {
    padding: 24px !important;
    background:
        radial-gradient(circle at 8% 14%, rgba(36, 86, 216, 0.1), transparent 29rem),
        radial-gradient(circle at 92% 82%, rgba(0, 168, 107, 0.09), transparent 31rem),
        #f4f6fa !important;
}

.swal2-popup.init-modal-size {
    width: min(1040px, calc(100vw - 32px)) !important;
    height: auto !important;
    max-height: calc(100vh - 32px);
    padding: 30px 38px 34px !important;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(220, 227, 236, 0.95);
    border-radius: 26px !important;
    color: var(--limgo-room-ink) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 28px 80px rgba(20, 33, 61, 0.15) !important;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif !important;
}

.init-modal-size .limgo-prejoin-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 14px;
}

.init-modal-size .limgo-prejoin-brand img {
    display: block;
    width: auto;
    height: 43px;
    object-fit: contain;
}

.init-modal-size .limgo-prejoin-security {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid #caeadc;
    border-radius: 999px;
    color: #08794f;
    background: var(--limgo-room-green-soft);
    font-size: 11px;
    font-weight: 750;
}

.init-modal-size .swal2-title {
    margin: 5px 0 0 !important;
    padding: 0 !important;
    color: var(--limgo-room-ink) !important;
    font-family: inherit !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.035em;
}

.init-modal-size .limgo-prejoin-subtitle {
    margin: 8px auto 0;
    color: var(--limgo-room-muted);
    font-size: 13px;
    line-height: 1.55;
}

.init-modal-size .swal2-html-container {
    margin: 24px 0 0 !important;
    overflow: visible !important;
    color: var(--limgo-room-ink) !important;
}

.init-modal-size #initUser {
    display: grid !important;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
    gap: 26px;
    align-items: stretch;
    padding: 0 !important;
}

.init-modal-size .init-video-container {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 7px !important;
    overflow: hidden;
    border: 1px solid #d9e2ef;
    border-radius: 19px;
    background: #eaf0fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.init-modal-size .init-video-container::after {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    color: #08794f;
    background: rgba(234, 249, 243, 0.92);
    box-shadow: 0 5px 16px rgba(20, 33, 61, 0.12);
    content: "Камера включена";
    font-size: 10px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.init-modal-size .init-video-container video {
    display: block;
    width: 100% !important;
    height: 286px !important;
    object-fit: cover;
    border: 0 !important;
    border-radius: 14px;
    background: #dce5f3;
}

.init-modal-size .init-video-loader {
    border-radius: 14px;
    background: #eef3fb;
}

.init-modal-size .initComands {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 9px;
    align-content: start;
    width: 100%;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--limgo-room-border);
    border-radius: 19px;
    background: #fbfcfe;
}

.init-modal-size .initComands::before {
    grid-column: 1 / -1;
    margin-bottom: 3px;
    color: var(--limgo-room-ink);
    content: "Камера и звук";
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.init-modal-size .init-user button {
    width: 100% !important;
    min-width: 0;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--limgo-room-border) !important;
    border-radius: 11px !important;
    color: var(--limgo-room-blue) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(20, 33, 61, 0.04);
    font-size: 14px !important;
    transition:
        border-color 0.16s ease,
        color 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}

.init-modal-size .init-user button:hover {
    border-color: #c7d6ff !important;
    color: var(--limgo-room-blue-dark) !important;
    background: var(--limgo-room-blue-soft) !important;
    transform: translateY(-1px);
}

.init-modal-size #initExitButton {
    color: #d73352 !important;
}

.init-modal-size #initExitButton:hover {
    border-color: #f0c3cc !important;
    background: #fff0f3 !important;
}

.init-modal-size .init-user select {
    grid-column: 1 / -1;
    width: 100%;
    height: 46px;
    margin: 0 !important;
    padding: 0 38px 0 41px !important;
    border: 1px solid var(--limgo-room-border) !important;
    border-radius: 12px !important;
    outline: 0;
    color: var(--limgo-room-ink) !important;
    background-color: #ffffff !important;
    background-repeat: no-repeat !important;
    background-position: 15px center !important;
    background-size: 13px !important;
    box-shadow: none !important;
    font-size: 12px;
    cursor: pointer;
}

.init-modal-size .init-user select:focus {
    border-color: var(--limgo-room-blue) !important;
    box-shadow: 0 0 0 4px rgba(36, 86, 216, 0.09) !important;
}

.init-modal-size #initVideoSelect {
    margin-top: 7px !important;
}

.init-modal-size .swal2-input {
    width: 100% !important;
    height: 49px !important;
    margin: 22px 0 0 !important;
    padding: 0 16px !important;
    border: 1px solid var(--limgo-room-border) !important;
    border-radius: 13px !important;
    outline: 0;
    color: var(--limgo-room-ink) !important;
    background: #ffffff !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 650;
    text-align: left;
}

.init-modal-size .swal2-input:focus {
    border-color: var(--limgo-room-blue) !important;
    box-shadow: 0 0 0 4px rgba(36, 86, 216, 0.1) !important;
}

.init-modal-size .swal2-input::placeholder {
    color: #a0a9b8;
    font-weight: 400;
}

.init-modal-size .swal2-actions {
    width: 100%;
    margin: 18px 0 0 !important;
}

.init-modal-size .swal2-confirm {
    min-width: 230px;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 24px !important;
    border: 0 !important;
    border-radius: 13px !important;
    color: #ffffff !important;
    background: var(--limgo-room-blue) !important;
    box-shadow: 0 11px 25px rgba(36, 86, 216, 0.22) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    transition:
        background 0.16s ease,
        transform 0.16s ease;
}

.init-modal-size .swal2-confirm:hover {
    background: var(--limgo-room-blue-dark) !important;
    transform: translateY(-1px);
}

.init-modal-size .swal2-validation-message {
    margin: 14px 0 0;
    border-radius: 11px;
    color: #a5283e;
    background: #fff1f3;
    font-family: inherit;
    font-size: 12px;
}

@media (max-width: 820px) {
    .swal2-container.swal2-backdrop-show:has(.init-modal-size) {
        padding: 10px !important;
    }

    .swal2-popup.init-modal-size {
        width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 20px);
        padding: 22px 20px 25px !important;
        border-radius: 21px !important;
    }

    .init-modal-size #initUser {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .init-modal-size .init-video-container video {
        height: min(260px, 36vh) !important;
    }

    .init-modal-size .initComands {
        padding: 15px;
    }
}

@media (max-width: 500px) {
    .init-modal-size .limgo-prejoin-brand img {
        height: 36px;
    }

    .init-modal-size .limgo-prejoin-security {
        padding: 7px 9px;
        font-size: 9px;
    }

    .init-modal-size .swal2-title {
        font-size: 25px !important;
    }

    .init-modal-size .limgo-prejoin-subtitle {
        font-size: 12px;
    }

    .init-modal-size .swal2-html-container {
        margin-top: 18px !important;
    }

    .init-modal-size .init-video-container video {
        height: min(220px, 31vh) !important;
    }

    .init-modal-size .initComands {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
    }

    .init-modal-size .swal2-confirm {
        width: 100%;
    }
}

#loadingDiv {
    isolation: isolate;
    width: min(540px, calc(100vw - 32px));
    padding: 26px 36px 30px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    color: var(--limgo-room-ink);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 34px 90px rgba(23, 26, 61, 0.18);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    backdrop-filter: blur(18px);
}

#loadingDiv::before {
    content: "";
    position: fixed;
    z-index: -2;
    inset: -100vh -100vw;
    background:
        radial-gradient(circle at 15% 18%, rgba(85, 70, 232, 0.12), transparent 28rem),
        radial-gradient(circle at 87% 84%, rgba(9, 184, 120, 0.1), transparent 30rem),
        #f4f5fa;
}

#loadingDiv::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -70px;
    bottom: -58px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(85, 70, 232, 0.09), rgba(9, 184, 120, 0.1));
    filter: blur(2px);
}

#loadingDiv .limgo-loading-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

#loadingDiv .limgo-loading-brand img {
    display: block;
    width: 155px;
    height: 40px;
    object-fit: contain;
}

#loadingDiv .limgo-loading-brand > span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #ceeddf;
    border-radius: 999px;
    color: #087a51;
    background: #f0fbf6;
    font-size: 11px;
    font-weight: 750;
}

#loadingDiv .loading-spinner {
    width: 96px;
    height: 96px;
    margin: 0 auto 17px;
}

#loadingDiv .spinner-ring {
    border: 3px solid rgba(85, 70, 232, 0.11);
    border-top-color: var(--limgo-room-blue);
    border-right-color: var(--limgo-room-green);
    box-shadow: 0 0 0 8px rgba(85, 70, 232, 0.035);
}

#loadingDiv .spinner-ring::before {
    inset: 7px;
    border: 3px solid rgba(9, 184, 120, 0.08);
    border-top-color: rgba(9, 184, 120, 0.68);
}

#loadingDiv .limgo-spinner-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, var(--limgo-room-blue), #4035bd);
    box-shadow: 0 12px 28px rgba(85, 70, 232, 0.26);
    font-size: 21px;
}

#loadingDiv .limgo-loading-kicker {
    margin-bottom: 8px;
    color: var(--limgo-room-blue);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#loadingDiv h1 {
    margin: 0;
    padding: 0;
    color: var(--limgo-room-ink);
    font-family: inherit;
    font-size: clamp(30px, 5vw, 40px);
    font-weight: 780;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

#loadingDiv pre,
#loadingDiv .loading-message {
    max-width: 440px;
    margin: 13px auto 0;
    padding: 0;
    color: var(--limgo-room-muted);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.65;
}

#loadingDiv .limgo-permission-tip {
    margin-top: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: 38px 38px 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--limgo-room-border);
    border-radius: 16px;
    text-align: left;
    background: #f8f9fc;
}

#loadingDiv .limgo-permission-tip > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--limgo-room-blue);
    background: #eceaff;
    font-size: 14px;
}

#loadingDiv .limgo-permission-tip > span:nth-child(2) {
    color: #078c5e;
    background: #e8f9f2;
}

#loadingDiv .limgo-permission-tip p {
    margin: 0 0 0 3px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#loadingDiv .limgo-permission-tip b {
    color: var(--limgo-room-ink);
    font-size: 13px;
}

#loadingDiv .limgo-permission-tip small {
    color: #878ca0;
    font-size: 11px;
    line-height: 1.35;
}

#loadingDiv .limgo-loading-progress {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

#loadingDiv .limgo-loading-progress i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d6d8e3;
    animation: limgo-loading-dot 1.2s ease-in-out infinite;
}

#loadingDiv .limgo-loading-progress i:nth-child(2) {
    animation-delay: 0.16s;
}

#loadingDiv .limgo-loading-progress i:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes limgo-loading-dot {
    0%,
    70%,
    100% {
        transform: translateY(0);
        background: #d6d8e3;
    }
    35% {
        transform: translateY(-5px);
        background: var(--limgo-room-green);
    }
}

@media (max-width: 600px) {
    #loadingDiv {
        width: calc(100vw - 20px);
        padding: 20px 18px 24px;
        border-radius: 22px;
    }

    #loadingDiv .limgo-loading-brand {
        margin-bottom: 18px;
    }

    #loadingDiv .limgo-loading-brand img {
        width: 128px;
        height: 34px;
    }

    #loadingDiv .limgo-loading-brand > span {
        padding: 7px 9px;
        font-size: 9px;
    }

    #loadingDiv .loading-spinner {
        width: 82px;
        height: 82px;
    }

    #loadingDiv .limgo-spinner-icon {
        width: 46px;
        height: 46px;
        border-radius: 15px;
        font-size: 18px;
    }

    #loadingDiv .loading-message br {
        display: none;
    }

    #loadingDiv .limgo-permission-tip {
        grid-template-columns: 34px 34px 1fr;
        padding: 11px;
    }

    #loadingDiv .limgo-permission-tip > span {
        width: 32px;
        height: 32px;
    }
}
