.pwa-install-button,
.pwa-push-button {
    align-items: center;
    background: var(--primary-color, #3B82F6);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    cursor: pointer;
    display: none;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    line-height: 1;
    min-height: 44px;
    padding: 0 16px;
    position: fixed;
    left: 50%;
    right: auto;
    transition: opacity 160ms ease, transform 160ms ease;
    transform: translateX(-50%);
    z-index: 9999;
}

.pwa-install-button {
    bottom: 22px;
}

.pwa-push-button {
    bottom: 76px;
}

.pwa-install-button.is-visible,
.pwa-push-button.is-visible {
    display: inline-flex;
}

.pwa-install-button:focus,
.pwa-push-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.28);
    outline-offset: 3px;
}

.pwa-install-button:hover,
.pwa-push-button:hover {
    transform: translateX(-50%) translateY(-1px);
}

.pwa-install-button i,
.pwa-push-button i {
    font-size: 19px;
}

.pwa-push-button.is-loading {
    cursor: wait;
    opacity: 0.76;
}

.pwa-ios-install-sheet {
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.5);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 10000;
}

.pwa-ios-install-sheet.is-visible {
    display: flex;
}

.pwa-ios-install-dialog {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
    color: #111827;
    max-width: 430px;
    padding: 18px;
    width: 100%;
}

.pwa-ios-install-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
}

.pwa-ios-install-badge,
.pwa-ios-install-step-icon {
    align-items: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    color: var(--primary-color, #3B82F6);
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.pwa-ios-install-badge {
    height: 42px;
    width: 42px;
}

.pwa-ios-install-badge i {
    font-size: 25px;
}

.pwa-ios-install-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.pwa-ios-install-title {
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

.pwa-ios-install-description {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.45;
    margin: 6px 0 0;
}

.pwa-ios-install-close {
    align-items: center;
    background: #f3f4f6;
    border: 0;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.pwa-ios-install-close:focus {
    outline: 3px solid rgba(59, 130, 246, 0.28);
    outline-offset: 2px;
}

.pwa-ios-install-close:hover {
    background: #e5e7eb;
}

.pwa-ios-install-close i {
    font-size: 18px;
}

.pwa-ios-install-steps {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.pwa-ios-install-step {
    align-items: center;
    color: #1f2937;
    display: grid;
    font-size: 14px;
    font-weight: 600;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
    line-height: 1.35;
}

.pwa-ios-install-step-icon {
    height: 34px;
    width: 34px;
}

.pwa-ios-install-step-icon i {
    font-size: 20px;
}

@media (min-width: 576px) {
    .pwa-ios-install-sheet {
        align-items: center;
    }
}

@media (max-width: 575px) {
    .pwa-install-button,
    .pwa-push-button {
        justify-content: center;
        left: 14px;
        right: 14px;
        transform: none;
        width: calc(100% - 28px);
    }

    .pwa-install-button {
        bottom: 14px;
    }

    .pwa-push-button {
        bottom: 72px;
    }

    .pwa-install-button:hover,
    .pwa-push-button:hover {
        transform: translateY(-1px);
    }

    .pwa-ios-install-sheet {
        padding: 14px;
    }

    .pwa-ios-install-dialog {
        padding: 16px;
    }
}

/* Prevent auto-zoom on mobile inputs */
@media screen and (max-width: 767px) {
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Custom Pull-To-Refresh Style */
.pwa-ptr-container {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    z-index: 9999999;
    pointer-events: none;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-ptr-container.ptr-transitioning {
    transition: transform 0.3s cubic-bezier(0.1, 0.88, 0.3, 1), opacity 0.3s ease;
}

.pwa-ptr-circle {
    width: 44px;
    height: 44px;
    background: rgba(30, 32, 80, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pwa-ptr-svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
    transition: color 0.3s ease;
}

.pwa-ptr-arrow {
    transform-origin: center;
}

.pwa-ptr-spinner {
    display: none;
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color, #3B82F6);
    border-radius: 50%;
    animation: ptr-spin 0.8s linear infinite;
}

.ptr-active .pwa-ptr-circle {
    background-color: var(--primary-color, #3B82F6);
    border-color: rgba(255, 255, 255, 0.3);
}

.ptr-active .pwa-ptr-svg {
    color: #ffffff;
}

.ptr-loading .pwa-ptr-svg {
    display: none;
}

.ptr-loading .pwa-ptr-spinner {
    display: block;
}

@keyframes ptr-spin {
    to {
        transform: rotate(360deg);
    }
}


