@import 'tailwindcss';
@plugin '@tailwindcss/forms';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Figtree', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

[x-cloak] {
    display: none !important;
}

@media (max-width: 639px) {
    .public-brand-logo {
        max-width: 50vw;
    }
}

/* App shell: always light (ignore OS dark mode). Live meeting keeps dark UI. */
html.app-shell {
    color-scheme: light;
}

@media (max-width: 1023px) {
    html.app-shell {
        --ladill-mobile-nav-height: calc(4rem + env(safe-area-inset-bottom, 0px));
    }

    html.app-shell .ladill-mobile-main {
        padding-bottom: calc(var(--ladill-mobile-nav-height) + 1rem);
    }

    html.app-shell .ladill-mobile-bottom-nav__bar {
        min-height: var(--ladill-mobile-nav-height);
    }
}

html.app-shell :is(input, select, textarea) {
    color-scheme: light;
}

html.meet-room-page {
    color-scheme: dark;
}

.meet-room-page .meet-toolbar-icon {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.meet-room-page .meet-chat-bubble {
    max-width: 85%;
}

.meet-room-page .meet-chat-bubble--own {
    margin-left: auto;
}

.meet-room-page .meet-tile-speaking {
    box-shadow: 0 0 0 2px rgb(52 211 153 / 0.9);
}

.meet-room-page .meet-stage-spotlight:has(.meet-tile-speaking) {
    box-shadow: 0 0 0 2px rgb(52 211 153 / 0.9);
}

.meet-room-page .meet-stage-spotlight .meet-tile-speaking {
    box-shadow: none;
}

.meet-room-page #meet-stage:not(.meet-stage) #meet-stage-spotlight,
.meet-room-page #meet-stage:not(.meet-stage) #meet-audience-strip {
    display: none;
}

.meet-room-page .meet-stage {
    height: 100%;
}

.meet-room-page .meet-stage--plenary #video-grid {
    display: none;
}

.meet-room-page .meet-stage--plenary .meet-stage-spotlight {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    border-radius: 0.75rem;
    overflow: hidden;
}

.meet-room-page .meet-stage--plenary .meet-stage-spotlight-tile {
    height: 100%;
    width: 100%;
    max-height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 0;
}

.meet-room-page .meet-stage-spotlight-tile [data-tile-body] {
    overflow: hidden;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.meet-room-page .meet-stage-spotlight-tile [data-tile-footer] {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.meet-room-page .meet-stage-spotlight-tile [data-tile-stage] video {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.meet-room-page [data-participant-tile] {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Regular meeting gallery — compact on mobile, multi-column on larger screens */
.meet-room-page .meet-gallery-grid {
    display: grid;
    height: 100%;
    min-height: 0;
    gap: 0.5rem;
    overflow-y: auto;
    align-content: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .meet-room-page .meet-gallery-grid {
        gap: 0.5rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .meet-room-page .meet-gallery-grid {
        gap: 0.5rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .meet-room-page .meet-room-main {
        padding: 0.5rem;
        padding-bottom: 0.25rem;
    }

    .meet-room-page .meet-gallery-grid {
        gap: 0.25rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .meet-room-page .meet-gallery-grid.meet-gallery-grid--many {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .meet-room-page .meet-gallery-grid.meet-gallery-grid--dense {
        gap: 0.125rem;
    }

    .meet-room-page .meet-gallery-grid.meet-gallery-grid--solo {
        grid-template-columns: minmax(0, 1fr);
        place-items: center;
    }

    .meet-room-page .meet-gallery-grid [data-participant-tile] {
        aspect-ratio: auto;
        width: 100%;
        border-radius: 0.5rem;
    }

    .meet-room-page .meet-gallery-grid.meet-gallery-grid--solo [data-participant-tile] {
        max-height: min(42vh, 100%);
    }

    .meet-room-page .meet-gallery-grid [data-tile-body] {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 10;
    }

    .meet-room-page .meet-gallery-grid.meet-gallery-grid--many [data-tile-body],
    .meet-room-page .meet-gallery-grid.meet-gallery-grid--dense [data-tile-body] {
        aspect-ratio: 1 / 1;
    }

    .meet-room-page .meet-gallery-grid [data-tile-footer] {
        position: absolute;
        inset-inline: 0;
        bottom: 0;
        z-index: 2;
        border: 0;
        background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.15) 55%, transparent);
        padding: 0.875rem 0.375rem 0.25rem;
    }

    .meet-room-page .meet-gallery-grid [data-tile-name] {
        font-size: 0.625rem;
        line-height: 1.1;
    }

    .meet-room-page .meet-gallery-grid [data-tile-mic],
    .meet-room-page .meet-gallery-grid [data-tile-cam],
    .meet-room-page .meet-gallery-grid [data-tile-speaking] {
        padding: 0.125rem;
    }

    .meet-room-page .meet-gallery-grid [data-tile-mic] svg,
    .meet-room-page .meet-gallery-grid [data-tile-cam] svg,
    .meet-room-page .meet-gallery-grid [data-tile-speaking] svg {
        height: 0.625rem;
        width: 0.625rem;
    }

    .meet-room-page .meet-gallery-grid [data-tile-avatar-circle] {
        height: 2.25rem;
        width: 2.25rem;
        font-size: 0.6875rem;
    }
}

.meet-room-page [data-tile-body] {
    position: relative;
    min-height: 0;
    flex: 1 1 0;
}

.meet-room-page [data-tile-footer] {
    flex-shrink: 0;
}

.meet-room-page .meet-audience-strip {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 2.75rem;
    margin-top: 0.25rem;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid rgb(30 41 59 / 0.8);
}

.meet-room-page .meet-audience-strip:empty {
    display: none;
    min-height: 0;
    margin-top: 0;
    padding: 0;
    border-top: 0;
}

.meet-room-page .meet-stage--panel #meet-stage-spotlight {
    display: none;
}

.meet-room-page .meet-stage--panel .meet-stage-panel-grid {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
}

.meet-room-page .meet-stage-panel-grid {
    display: grid;
    height: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    grid-auto-rows: minmax(0, 1fr);
    align-content: center;
}

.meet-room-page .meet-stage-panel-tile {
    height: 100%;
    min-height: 12rem;
}

.meet-room-page .meet-audience-avatar {
    position: relative;
    display: flex;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-left: -0.45rem;
    overflow: hidden;
    border-radius: 9999px;
    border: 2px solid rgb(15 23 42);
    background: rgb(30 41 59);
}

.meet-room-page .meet-audience-avatar:first-child {
    margin-left: 0;
}

.meet-room-page .meet-audience-avatar__image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.meet-room-page .meet-audience-avatar__initials {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.meet-room-page .meet-audience-avatar--more {
    z-index: 0;
    width: auto;
    min-width: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgb(203 213 225);
    white-space: nowrap;
}

.meet-room-page .meet-audience-avatar--speaker {
    border-color: rgb(139 92 246 / 0.55);
}

.meet-room-page .meet-audio-grid {
    display: grid;
    width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 9.5rem));
}

@media (min-width: 640px) {
    .meet-room-page .meet-audio-grid {
        gap: 1.25rem;
        padding: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(8.5rem, 10rem));
        align-content: center;
    }
}

.meet-room-page .meet-audio-grid.meet-audio-grid--solo {
    grid-template-columns: minmax(0, 10rem);
    place-content: center;
}

.meet-room-page .meet-audio-grid [data-participant-tile] {
    position: relative;
    width: 100%;
    max-width: 10rem;
    justify-self: center;
    isolation: isolate;
}

.meet-room-page .meet-audio-grid.meet-space-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
    padding: 1rem 0.75rem 1.5rem;
    max-width: 24rem;
    margin-inline: auto;
    align-content: start;
}

@media (min-width: 640px) {
    .meet-room-page .meet-audio-grid.meet-space-grid {
        max-width: 28rem;
        gap: 1.5rem 1rem;
    }
}

.meet-room-page .meet-audio-grid.meet-space-grid [data-participant-tile] {
    max-width: none;
}

.meet-room-page .meet-space-tile {
    background: transparent;
    box-shadow: none;
}

.meet-room-page .meet-space-tile.meet-tile-speaking {
    box-shadow: none;
}

.meet-room-page .meet-space-tile.meet-tile-speaking [data-tile-avatar-circle] {
    box-shadow: 0 0 0 2px rgb(56 189 248 / 0.85);
}

.meet-room-page .meet-space-tile--listener [data-tile-avatar-circle] {
    opacity: 0.88;
}

.meet-room-page .meet-space-tile [data-tile-name] {
    width: 100%;
    padding-inline: 0.125rem;
}

.meet-room-page .meet-space-tile [data-tile-role-row] {
    min-height: 1rem;
    max-width: 100%;
}

.meet-room-page .meet-space-tile [data-tile-role] {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meet-room-page .meet-space-tile [data-tile-avatar-circle] {
    height: 4.75rem;
    width: 4.75rem;
    font-size: 1.125rem;
}

@media (min-width: 640px) {
    .meet-room-page .meet-space-tile [data-tile-avatar-circle] {
        height: 5.25rem;
        width: 5.25rem;
        font-size: 1.25rem;
    }
}

.meet-room-page .meet-audio-tile {
    width: 100%;
    min-width: 0;
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
}

.meet-room-page .meet-audio-tile [data-tile-body] {
    flex: 1 1 auto;
    min-height: 0;
}

.meet-room-page .meet-audio-tile [data-tile-footer] {
    flex-shrink: 0;
}

.meet-room-page .meet-audio-tile [data-tile-avatar-circle] {
    height: 4.5rem;
    width: 4.5rem;
    font-size: 1.25rem;
}

.meet-room-page .meet-speaking-bar {
    transform-origin: center bottom;
    animation: meet-speaking-pulse 0.9s ease-in-out infinite;
}

.meet-room-page .meet-speaking-bar--1 {
    animation-delay: 0s;
}

.meet-room-page .meet-speaking-bar--2 {
    animation-delay: 0.15s;
}

.meet-room-page .meet-speaking-bar--3 {
    animation-delay: 0.3s;
}

@keyframes meet-speaking-pulse {
    0%,
    100% {
        transform: scaleY(0.45);
        opacity: 0.65;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Meeting room footer */
.meet-room-page .meet-room-footer {
    min-height: 4.75rem;
}

@media (max-width: 639px) {
    .meet-room-page .meet-room-footer {
        min-height: calc(3.75rem + env(safe-area-inset-bottom, 0px));
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    .meet-room-page .meet-toolbar__track {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding-inline: 1rem;
    }

    .meet-room-page .meet-toolbar__primary {
        display: flex;
        min-width: 0;
        flex: 1;
        align-items: center;
        gap: 0.5rem;
    }

    .meet-room-page .meet-toolbar__divider {
        width: 1px;
        height: 2rem;
        flex-shrink: 0;
        background-color: rgb(51 65 85);
    }

    .meet-room-page .meet-toolbar__actions {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (min-width: 640px) {
    .meet-room-page .meet-toolbar__track {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
}

/* Meeting room chat / participants: bottom sheet on mobile, sidebar on desktop */
.meet-room-page .meet-room-panel {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.meet-room-page .meet-room-panel__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgb(2 6 23 / 0.72);
    backdrop-filter: blur(4px);
}

.meet-room-page .meet-room-panel__sheet {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-height: min(85vh, 100%);
    flex-direction: column;
    border-radius: 1.5rem 1.5rem 0 0;
    background-color: rgb(2 6 23);
    padding: 0 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.meet-room-page .meet-room-panel__handle {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0 0.25rem;
}

.meet-room-page .meet-room-panel__handle span {
    display: block;
    height: 0.25rem;
    width: 2.5rem;
    border-radius: 9999px;
    background-color: rgb(51 65 85);
}

.meet-room-page .meet-room-panel__header {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.25rem 0.75rem;
}

.meet-room-page .meet-room-panel__body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1rem;
    background-color: rgb(15 23 42 / 0.9);
    padding: 0.75rem;
}

@media (min-width: 640px) {
    .meet-room-page .meet-room-panels-stack {
        position: relative;
        height: 100%;
        flex-shrink: 0;
        transition: width 0s;
    }

    .meet-room-page .meet-room-panels-stack.is-open {
        width: 20rem;
    }

    .meet-room-page .meet-room-panels-stack:not(.is-open) {
        width: 0;
        overflow: hidden;
    }

    .meet-room-page .meet-room-panels-stack .meet-room-panel__pane {
        position: absolute;
        inset: 0;
        width: 20rem;
        height: 100%;
    }

    .meet-room-page .meet-room-panel {
        position: relative;
        inset: auto;
        z-index: auto;
        display: flex;
        height: 100%;
        width: 20rem;
        flex-shrink: 0;
        justify-content: flex-start;
    }

    .meet-room-page .meet-room-panel__backdrop,
    .meet-room-page .meet-room-panel__handle {
        display: none;
    }

    .meet-room-page .meet-room-panel__sheet {
        display: flex;
        height: 100%;
        max-height: none;
        flex: 1;
        flex-direction: column;
        border-radius: 0;
        padding: 0.75rem;
    }

    .meet-room-page .meet-room-panel__body {
        border-radius: 1rem;
    }
}

/* QR create/show: flush mobile action bar to the physical screen bottom (mobile only) */
@media (max-width: 1023px) {
    .mobile-action-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        flex-direction: column;
        background-color: #fff;
    }

    .mobile-action-bar__toolbar {
        display: flex;
        height: 4rem;
        flex-shrink: 0;
        align-items: center;
        gap: 0.75rem;
        border-top: 1px solid rgb(226 232 240);
        background-color: #fff;
        padding-inline: 1rem;
    }

    .mobile-action-bar__inset-fill {
        flex-shrink: 0;
        width: 100%;
        background-color: #fff;
        height: env(safe-area-inset-bottom, 0px);
        min-height: max(env(safe-area-inset-bottom, 0px), 20px);
    }
}

/* Extra white bleed behind the bar for any remaining viewport gap on mobile */
.qr-mobile-bottom-bleed {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 48;
    pointer-events: none;
    background-color: #fff;
    height: calc(4rem + env(safe-area-inset-bottom, 0px) + 24px);
    min-height: calc(4rem + 24px);
}

html.qr-mobile-page {
    background-color: #fff;
}

html.qr-mobile-page body {
    background-color: #fff;
}

/* Payment QR landing: lock scroll and keep the amount sheet flush to the screen bottom */
@media (max-width: 767px) {
    html.mini-payment-page,
    html.mini-payment-page body {
        overflow: hidden;
        width: 100%;
        height: 100%;
    }

    html.mini-payment-page body {
        position: fixed;
        inset: 0;
    }

    .mini-payment-sheet {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 20;
    }

    .mini-payment-bottom-bleed {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 19;
        pointer-events: none;
        background-color: #fff;
        height: calc(12rem + env(safe-area-inset-bottom, 0px));
        min-height: 8rem;
    }
}

.mobile-stats-card {
    width: calc(66.666667% - 0.5rem);
}

@layer components {
    .btn-primary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 9999px;
        background-image: linear-gradient(to right, rgb(79 70 229), rgb(124 58 237));
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 600;
        color: #fff;
        box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        transition: filter 0.15s ease;
    }

    .btn-primary:hover {
        filter: brightness(0.92);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        pointer-events: none;
    }

    .btn-primary-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        line-height: 1rem;
    }

    .btn-primary-lg {
        padding: 0.625rem 1.25rem;
    }

    .btn-secondary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 9999px;
        border: 1px solid rgb(226 232 240);
        background-color: #fff;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 600;
        color: rgb(51 65 85);
        box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .btn-secondary:hover {
        background-color: rgb(248 250 252);
        border-color: rgb(203 213 225);
    }

    .btn-secondary:disabled {
        opacity: 0.6;
        pointer-events: none;
    }

    .btn-secondary-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        line-height: 1rem;
    }

    .btn-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .btn-fab {
        display: inline-flex;
        height: 2.75rem;
        width: 2.75rem;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        background-image: linear-gradient(to right, rgb(79 70 229), rgb(124 58 237));
        color: #fff;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        transition: filter 0.15s ease;
    }

    .btn-fab:hover {
        filter: brightness(0.92);
    }
}


@media (min-width: 640px) {
    .mobile-stats-card {
        width: auto;
    }
}

/* Ladill app launcher — cap at 5 rows (15 apps), always-visible scroll indicator */
.ladill-launcher-apps-wrap {
    position: relative;
}

.ladill-launcher-apps {
    max-height: calc(5 * 5.25rem + 4 * 0.25rem);
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgb(148 163 184) rgb(241 245 249);
    margin-right: -0.25rem;
    padding-right: 0.25rem;
}

.ladill-launcher-apps::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 8px;
}

.ladill-launcher-apps::-webkit-scrollbar-track {
    background: rgb(241 245 249);
    border-radius: 9999px;
}

.ladill-launcher-apps::-webkit-scrollbar-thumb {
    background-color: rgb(148 163 184);
    border-radius: 9999px;
    min-height: 2.5rem;
    border: 2px solid rgb(241 245 249);
    background-clip: padding-box;
}

.ladill-launcher-apps::-webkit-scrollbar-thumb:hover {
    background-color: rgb(100 116 139);
}

.ladill-launcher-scroll-more {
    position: absolute;
    left: 50%;
    bottom: 0.125rem;
    z-index: 1;
    display: flex;
    height: 1.25rem;
    width: 1.25rem;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgb(255 255 255);
    color: rgb(100 116 139);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
    pointer-events: none;
}
