/**
 * Fullscreen Game View - Main Stylesheet
 */

/* Base button styles */
.fsgv-fullscreen-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    position: absolute;
    opacity: 0.7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fsgv-fullscreen-button:hover {
    opacity: 1;
    transform: scale(1.05);
}

.fsgv-fullscreen-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Button sizes */
.fsgv-size-small {
    width: 24px;
    height: 24px;
    padding: 4px;
}

.fsgv-size-medium {
    width: 32px;
    height: 32px;
    padding: 6px;
}

.fsgv-size-large {
    width: 40px;
    height: 40px;
    padding: 8px;
}

/* Button positions */
.fsgv-position-top-left {
    top: 10px;
    left: 10px;
}

.fsgv-position-top-right {
    top: 10px;
    right: 10px;
}

.fsgv-position-bottom-left {
    bottom: 10px;
    left: 10px;
}

.fsgv-position-bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Fullscreen container styles */
.fsgv-fullscreen-container {
    position: relative;
}

/* Fullscreen mode styles */
.fsgv-is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    z-index: 9998 !important;
    background-color: #000;
    margin: 0 !important;
    padding: 0 !important;
}

/* iOS specific fullscreen mode */
.fsgv-ios-fullscreen-mode {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fsgv-ios-fullscreen-mode * {
    -webkit-tap-highlight-color: transparent;
}

/* Exit fullscreen button */
.fsgv-exit-fullscreen {
    display: none;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.fsgv-is-fullscreen + .fsgv-exit-fullscreen {
    display: flex;
}

/* iOS specific exit button styles */
.fsgv-ios-fullscreen-mode .fsgv-exit-fullscreen {
    display: flex;
    opacity: 0.9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive styles for mobile devices */
@media (max-width: 768px) {
    .fsgv-fullscreen-button {
        opacity: 0.9; /* More visible on mobile */
    }
    
    /* Adjust button positions on mobile */
    .fsgv-position-top-left,
    .fsgv-position-top-right,
    .fsgv-position-bottom-left,
    .fsgv-position-bottom-right {
        margin: 5px;
    }
    
    /* Ensure buttons are large enough for touch */
    .fsgv-size-small {
        width: 30px;
        height: 30px;
        padding: 5px;
    }
    
    /* Larger exit button on mobile */
    .fsgv-exit-fullscreen {
        width: 44px;
        height: 44px;
        padding: 10px;
    }
}

/* iOS specific styles */
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2),
       only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
    
    .fsgv-exit-fullscreen {
        top: env(safe-area-inset-top, 10px);
        right: env(safe-area-inset-right, 10px);
        width: 50px;
        height: 50px;
        padding: 12px;
    }
}

/* Error message styling */
.fsgv-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}