/* PWA Install Button Styles */
#install-button {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3f51b5, #2196f3);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #303f9f, #1976d2);
}

#install-button:active {
    transform: translateY(0);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 4px 12px rgba(63, 81, 181, 0.4);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
}

/* Scroll to Top Button Styles */
.scrollup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3f51b5, #2196f3);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.scrollup i {
    color: white;
    font-size: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.scrollup:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #303f9f, #1976d2);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.scrollup:active {
    transform: translateY(0);
}

/* PWA Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #3f51b5, #2196f3);
    color: white;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.ios-instruction {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.ios-instruction .share-icon {
    font-size: 24px;
    color: #007bff;
    margin: 0 5px;
}

.ios-instruction .home-icon {
    font-size: 24px;
    color: #28a745;
    margin: 0 5px;
}

/* Install guide image styling */
.install-guide img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.install-guide img:hover {
    transform: scale(1.05);
}

/* Ensure step numbers are circular on all devices */
.step-number {
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #install-button {
        bottom: 20px;
        left: 15px;
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 20px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
        max-width: calc(100vw - 30px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .scrollup {
        bottom: 80px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .scrollup i {
        font-size: 18px;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    #install-button {
        bottom: 20px;
        left: 10px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 18px;
    }
}

/* WebView specific adjustments */
@media (max-width: 480px) {
    #install-button {
        font-size: 13px;
        padding: 8px 10px;
        max-width: calc(100vw - 20px);
    }
}

/* Hide install button when app is in standalone mode */
@media all and (display-mode: standalone) {
    #install-button {
        display: none !important;
    }
}
