/* App-level styles loaded via Asset Mapper. Porto theme CSS stays in public/. */

.app-toast-container {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 10070;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    padding: 12px 14px;
    border-radius: 4px;
    background: #2e353e;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    animation: app-toast-in 0.2s ease;
}

.app-toast-hiding {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.app-toast-text {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.75;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.app-toast-success {
    border-left: 4px solid #47a447;
}

.app-toast-error {
    border-left: 4px solid #d2322d;
}

.app-toast-info {
    border-left: 4px solid #5bc0de;
}

.app-toast-custom,
.app-toast-notice {
    border-left: 4px solid #0088cc;
}

.app-datatable-toolbar,
.app-datatable-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-datatable-toolbar {
    margin-bottom: 0.75rem;
}

.app-datatable-footer {
    margin-top: 0.75rem;
}

.app-datatable-length {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
}

.app-datatable-length .form-control {
    width: auto;
    display: inline-block;
    min-width: 4.5rem;
}

.app-datatable-search {
    min-width: min(260px, 100%);
}

.app-datatable-search .form-control {
    max-width: 100%;
}

.app-datatable-info {
    font-size: 0.8rem;
    color: #777;
}

.app-datatable-pager .page-link {
    cursor: pointer;
}

.app-datatable-empty {
    text-align: center;
}

.web-push-banner {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fff;
    color: #555;
    border: 1px solid #e9e9e6;
    border-left: 3px solid #0088cc;
    border-radius: 4px;
}

.web-push-banner.is-open {
    display: flex;
}

.web-push-banner-text {
    flex: 1 1 220px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.web-push-banner-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 13px;
    line-height: 1;
    padding: 6px 4px;
}

html.dark .web-push-banner {
    background: #2e353e;
    color: #e8e8e8;
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: #0088cc;
}

html.dark .web-push-banner-close {
    color: #bbb;
}

html.pull-refresh-on {
    overscroll-behavior-y: contain;
}

.pull-refresh {
    position: fixed;
    z-index: 1030;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0088cc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: var(--pull-opacity, 0);
    transform: translateY(var(--pull-y, 0px)) scale(var(--pull-scale, 0.75));
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pull-refresh.is-dragging {
    transition: none;
}

.pull-refresh i {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.pull-refresh.is-armed:not(.is-refreshing) i {
    transform: rotate(180deg);
}

html.dark .pull-refresh {
    background: #2e353e;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
