/**
 * Swipe Navigation Styles
 * Provides smooth transitions for screen navigation
 */

/* Screen transition animations */
.screen-transition {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.screen-slide-in-left {
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen-slide-in-right {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen-slide-out-left {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen-slide-out-right {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Keyframe animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Prevent text selection during swipe */
.swipe-active {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Smooth scrolling for content */
.main-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Visual feedback for swipe gesture */
.swipe-indicator {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(14, 165, 233, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.swipe-indicator.left {
    left: 20px;
}

.swipe-indicator.right {
    right: 20px;
}

.swipe-indicator.active {
    opacity: 1;
}

.swipe-indicator svg {
    width: 24px;
    height: 24px;
    color: #0ea5e9;
}

/* Ensure screens are positioned correctly for transitions */
[id$="-screen"] {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Edge swipe zones - subtle visual hint */
[id$="-screen"]::before,
[id$="-screen"]::after {
    content: '';
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100px;
    background: linear-gradient(to right, rgba(14, 165, 233, 0.05), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[id$="-screen"]::before {
    left: 0;
    background: linear-gradient(to right, rgba(14, 165, 233, 0.05), transparent);
}

[id$="-screen"]::after {
    right: 0;
    background: linear-gradient(to left, rgba(14, 165, 233, 0.05), transparent);
}

/* Show edge hints on touch-capable devices */
@media (hover: none) and (pointer: coarse) {
    [id$="-screen"]:not(.hidden)::before,
    [id$="-screen"]:not(.hidden)::after {
        opacity: 0.3;
    }
}

/* Disable swipe on certain elements */
.no-swipe,
.modal,
.dropdown,
input,
textarea,
select {
    touch-action: auto;
}

