﻿/* PullToRefresh Component Styles */

/*.ptr-app * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/

.ptr-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    position: relative;
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;*/
}

/* Fixed header */
.ptr-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
}

/* Fixed footer */
/*.ptr-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}*/

/* Container for PTR mechanism */
.ptr-content-wrapper {
    flex: 1;
   /* position: relative;*/
   /* overflow: hidden;*/

}

/* Pull indicator - sits at the top, initially hidden */
.ptr-pull-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 50%, #f5f0ff 100%);
    border-bottom: 1px solid #e0e0e0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .ptr-pull-indicator.visible {
        opacity: 1 !important;
    }

.ptr-pull-content {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease;
}

/* Spinner */
.ptr-spinner {
    width: 24px;
    height: 24px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top: 4px solid #6c41ad;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
    display: block;
}

    .ptr-spinner.spinning {
        animation: ptr-spin 1s linear infinite;
    }

@keyframes ptr-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ptr-pull-text {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

/* Scrollable content */
.ptr-scroll-container {
    /*position: absolute;*/
    /*top: 0;*/
    /*left: 0;*/
    /*right: 0;*/
    /*bottom: 0;*/
    /*z-index: 2;*/
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: translateY(0);
    transition: none;
    min-height: calc(100vh - 126px);
}

    .ptr-scroll-container.transitioning {
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

/* Content list */
.ptr-list {
    padding: 0;
    margin: 0;
    list-style: none;
    background-color: #f5f0ff;
}

.ptr-list-item {
    /*padding: 16px 20px;*/
    /*border-bottom: 1px solid #e0e0e0;*/
    transition: background-color 0.2s ease;
    margin: 0px;
}


    .ptr-list-item.new {
        animation: ptr-slideDown 0.4s ease;
    }

@keyframes ptr-slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info box */
.ptr-info {
    margin: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
}

/* Desktop refresh button */
.ptr-refresh-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 100;
}

    .ptr-refresh-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    }

    .ptr-refresh-btn:active {
        transform: scale(0.95);
    }

    .ptr-refresh-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* Loading overlay for button refresh */
.ptr-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

    .ptr-loading-overlay.show {
        display: flex;
    }

    .ptr-loading-overlay .ptr-spinner {
        opacity: 1 !important;
        display: block !important;
        width: 32px;
        height: 32px;
    }
