/* photobooth.css - Core styles */
/* Main layout styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container-fluid {
    padding: 0;
}

/* App header with back button */
.app-header {
    background-color: #6200ee;
    height: 56px; /* Fixed height header */
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-header .container-fluid {
    height: 100%;
    padding: 0 15px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between; /* Distribute items evenly */
}

/* Header title styling */
.header-title {
    color: white;
    font-weight: 500;
    font-size: 1.25rem;
    flex-grow: 1;
    text-align: center;
}

/* Back button styling */
.back-btn {
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 12px;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.back-btn i {
    margin-right: 6px;
    font-size: 1.1rem;
}

/* QR scanner button styling (now on the right) */
.qr-scanner-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.qr-scanner-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.qr-scanner-btn i {
    margin-right: 6px;
}

/* Style for when printer is connected */
.qr-scanner-btn.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.qr-scanner-btn.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .back-btn span {
        display: none; /* Hide "Back" text on very small screens */
    }

    .back-btn i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .app-header .container-fluid {
        padding: 0 10px;
    }

    .header-title {
        font-size: 1.1rem;
    }

    .qr-scanner-btn i {
        margin-right: 0px;
    }
}

/* Main content area adjusted for header */
.main-content {
    min-height: calc(100vh - 56px);
}

/* Home page styles */
.controls-container {
    background-color: #6200ee;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
}

.controls-container h2 {
    color: white;
    font-weight: 500;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Subtle shadow for better readability */
}

.face-count-info {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-top: 15px;
}

/* Take Photo Button Styling */
.take-photo-button-container {
    padding: 15px 0;
    position: relative;
}

#btnTakePhoto, #btnTakePhoto2 {
    background-color: #4CAF50;
    color: white;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#btnTakePhoto i {
    margin-right: 8px;
}

/* Different sizes based on viewport */
@media (max-width: 767px) {
    /* Mobile version - compact */
    #btnTakePhoto {
        padding: 4px 8px;
        font-size: 0.8rem;
        margin: 0;
        box-shadow: none;
        border-radius: 3px;
        height: 32px;
    }
}

@media (min-width: 768px) {
    /* Desktop version */
    #btnTakePhoto2 {
        padding: 12px 20px;
        font-size: 1.2rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        border-radius: 4px;
    }

    #btnTakePhoto2 i {
        margin-right: 8px;
        font-size: 1.1em;
    }

    /* Hover effects only on desktop */
    #btnTakePhoto2:hover {
        background-color: #43A047;
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    }

    #btnTakePhoto2:active {
        transform: translateY(1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }
}

/* Add a subtle highlight around the button */
@keyframes highlightPulse {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
    }
}

.take-photo-button-container::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6); /* White border with transparency */
    border-radius: 6px;
    pointer-events: none;
    z-index: -1;
    animation: highlightPulse 2s infinite ease-in-out;
}

/* Full-size image viewer */
.full-size-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 0, 40, 0.9));
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease-out;
}

.full-size-image-viewer.visible {
    display: flex;
}

.full-size-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.full-size-image {
    position: fixed;
    transform-origin: center;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    z-index: 2001;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out,
    top 0.3s ease-out, left 0.3s ease-out,
    width 0.3s ease-out, height 0.3s ease-out;
}

.full-size-image.active {
    z-index: 2002;  /* Active image stays above inactive one */
}

.transition-image {
    position: fixed;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    z-index: 2000; /* Slightly lower than main image */
    transition: transform 0.3s ease-out;
}

.slide-out-left {
    transform: translateX(-100%) !important;
}

.slide-out-right {
    transform: translateX(100%) !important;
}

.btn-close-fs-viewer {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(98, 0, 238, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2002;
    opacity: 0;
    transition: all 0.2s ease;
    transform: scale(0.8);
}

.btn-close-fs-viewer.visible {
    opacity: 1;
    transform: scale(1);
}

.btn-close-fs-viewer:hover {
    background-color: rgba(98, 0, 238, 0.8);
    transform: scale(1.1);
}

.btn-close-fs-viewer i {
    font-size: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Prevent scrolling when viewer is open */
body.full-size-viewer-open {
    overflow: hidden;
    touch-action: none;
}

/* Additional styles for enhanced full-size viewer */
.image-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-navigation.visible {
    opacity: 1;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(98, 0, 238, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background-color: rgba(98, 0, 238, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.nav-button-prev {
    left: 20px;
}

.nav-button-next {
    right: 20px;
}

.face-count-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2002;
}

.face-count-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.face-count-badge i {
    margin-right: 5px;
}

/* Image loading indicator styling */
.image-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 10;
    min-width: 200px;
    color: #555;
    font-weight: 500;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.image-loading-indicator .spinner-border {
    display: block;
    margin: 0 auto 10px auto;
    color: #6200ee;
}

/* Prevent scroll on body when interacting with image on touch devices */
body.touch-interaction-active {
    overflow: hidden;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

/* Enhanced Loading Overlay Styles with Dialog */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-dialog {
    background-color: white;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 300px;
    animation: dialogAppear 0.3s ease-out;
}

@keyframes dialogAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-message {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Make the spinner larger and more visible */
.loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
}

/* Add a subtle pulse animation to the spinner */
@keyframes spinnerPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.loading-content .spinner-border {
    animation: spinner-border 0.75s linear infinite, spinnerPulse 2s ease-in-out infinite;
}

.toast-container {
    z-index: 1090; /* Above modals */
}

.toast {
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1 !important; /* Override Bootstrap's opacity */
}

.toast-header {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.toast-body {
    padding: 0.75rem;
    font-size: 0.95rem;
}

/* Make toast touch-friendly on mobile */
@media (max-width: 576px) {
    .toast-container {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .toast {
        width: 100%;
        max-width: none;
        border-radius: 0;
        margin-bottom: 0;
    }

    .app-header .container-fluid {
        padding: 0 10px; /* Just tighter padding on small screens */
    }
}

/* Update green button styling for consistency */
.btn-success,
.btn-green,
#btnTakePhoto,
#btnProcess,
#btnNext,
button.btn-success,
a.btn-success {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover:not(:disabled),
.btn-green:hover:not(:disabled),
#btnTakePhoto:hover:not(:disabled),
#btnProcess:hover:not(:disabled),
#btnNext:hover:not(:disabled),
button.btn-success:hover:not(:disabled),
a.btn-success:hover:not(:disabled) {
    background-color: #43A047;
    border-color: #43A047;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.btn-success:active:not(:disabled),
.btn-green:active:not(:disabled),
#btnTakePhoto:active:not(:disabled),
#btnProcess:active:not(:disabled),
#btnNext:active:not(:disabled),
button.btn-success:active:not(:disabled),
a.btn-success:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Subtle glow for emphasis on green buttons */
.btn-success,
.btn-green,
#btnTakePhoto,
#btnProcess,
#btnNext,
button.btn-success,
a.btn-success {
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* Disabled state for green buttons */
.btn-success:disabled,
.btn-green:disabled,
#btnTakePhoto:disabled,
#btnProcess:disabled,
#btnNext:disabled,
button.btn-success:disabled,
a.btn-success:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* QR Scanner "connected" state button */
.qr-scanner-btn.btn-success {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.qr-scanner-btn.btn-success:hover {
    background-color: #43A047;
    border-color: #43A047;
}

/* Mobile optimizations for home page */
@media (max-width: 767px) {
    /* General spacing reductions */
    .controls-container {
        padding: 10px;
        min-height: auto;
    }

    /* Reduce margin for face count info */
    .face-count-info {
        margin-top: 5px;
        margin-bottom: 5px;
        padding: 5px;
        font-size: 0.9rem;
    }

    /* Fix layout of controls container on mobile */
    .controls-container {
        display: flex;
        flex-direction: column;
        background-color: #6200ee;
        color: white;
        margin-top: 10px;
    }

    .controls-container h2,
    .controls-container h4 {
        color: white;
    }

    /* No images message smaller font */
    #noImagesMessage p {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    /* Make Next button sticky at bottom on mobile */
    .controls-container .mt-auto {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px;
        margin: 0;
        background-color: white;
        z-index: 100;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    /* Add padding to bottom of page to allow for fixed next button */
    body {
        padding-bottom: 60px;
    }

    /* Make buttons use less vertical space */
    #btnNext {
        padding: 8px 16px;
        font-size: 1rem;
        border-radius: 4px;
        font-weight: 600;
    }

    /* Make the button more visible */
    #btnNext {
        background-color: #4CAF50;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border: none;
    }
}

/* Very small phones (iPhone SE, etc) */
@media (max-width: 374px) {
    .controls-container h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    /* Smaller face count info */
    .face-count-info {
        font-size: 0.8rem;
    }

    /* Extra small buttons */
    #btnTakePhoto {
        padding: 3px 6px;
        height: 28px;
        width: 28px;
    }

    #btnTakePhoto i {
        font-size: 0.9rem;
    }
}

/* Mobile optimizations for thumbnails */
.mobile-thumbnail {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

.mobile-thumbnail img {
    height: 120px;
    object-fit: cover;
    width: 100%;
}

/* Button size helpers for responsive sizing */
@media (max-width: 767px) {
    .btn-md-regular {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Mobile-specific classes */
.mobile-sticky {
    position: sticky;
    top: 56px;
    z-index: 100;
    background-color: #6200ee;
    padding-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.mobile-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: white;
    z-index: 100;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Button visibility class for mobile scrolling */
.button-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Additional transition for smooth appearance/disappearance */
.controls-container .mt-auto {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-reverse-columns {
    margin: 0;
}

/* Make controls container more compact on small devices */
@media (max-width: 767px) {
    /* Minimal padding for the container */
    .controls-container {
        padding: 5px 8px;
        min-height: auto;
        margin: auto;
        display: flex;
        flex-direction: column;
    }

    /* Tighter spacing in the header row */
    .controls-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2px; /* Minimal margin */
    }

    /* Smaller title with no margins */
    .controls-container h4 {
        font-size: 0.9rem;
        margin: 0;
        flex: 1;
        /* Prevent overflow */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Minimal button container */
    .controls-container .take-photo-button-container {
        margin: 0;
        padding: 0;
    }

    /* Ultra-compact face count */
    .face-count-info {
        margin: 0;
        padding: 3px 6px;
        font-size: 0.8rem;
        line-height: 1;
        /* Make background more subtle */
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* Remove all decorative elements */
    .take-photo-button-container::after {
        display: none;
    }

    /* Remove all animations that take up performance */
    .take-photo-button-container,
    #btnTakePhoto {
        animation: none;
        transition: none;
        padding: 4px 10px;
    }

    /* Limit max height to absolute minimum needed */
    .controls-container {
        max-height: 65px; /* Super compact height */
    }
}

@media (max-width: 576px) {
    /* Icon only for the button on all small devices */
    #btnTakePhoto span {
        display: none;
    }

    #btnTakePhoto i {
        margin-right: 0;
    }
}

/* Extra compact for very small screens */
@media (max-width: 374px) {
    .controls-container {
        padding: 4px 6px;
    }

    .controls-container h4 {
        font-size: 0.8rem;
        max-width: 60%; /* Limit width to give more space to button */
    }

    #btnTakePhoto {
        padding: 3px 6px;
    }

    #btnTakePhoto i {
        margin-right: 0;
        font-size: 0.9rem;
    }

    .face-count-info {
        padding: 2px 4px;
        font-size: 0.75rem;
    }
}

/* Enhanced styles for the Next button on Home page - visual changes only */

/* Base button styling - preserving position */
#btnNext {
    position: relative; /* Position relative but maintain original layout */
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Button enhancement when enabled - no positioning changes */
#btnNext:not(:disabled) {
    background-color: #4CAF50; /* Green color like the Process button */
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    animation: nextButtonGlow 2s infinite alternate ease-in-out;
}

/* Pulsing glow animation - only affects shadow, not position */
@keyframes nextButtonGlow {
    0% {
        box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    }
    100% {
        box-shadow: 0 6px 15px rgba(76, 175, 80, 0.7);
    }
}

/* Add a sliding shine effect across the button */
#btnNext:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: nextButtonShine 3s infinite;
    pointer-events: none; /* Ensure it doesn't affect interactions */
    z-index: 1; /* Keep above the button but below text */
}

/* Sliding shine animation - no position changes */
@keyframes nextButtonShine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 150%;
    }
}

/* Additional attention-grabbing effect when first enabled - minimal movement */
#btnNext.attention-flash {
    animation: nextButtonAttention 0.6s ease-out, nextButtonGlow 2s infinite alternate ease-in-out;
}

@keyframes nextButtonAttention {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03); /* Very subtle scale - won't affect layout */
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced hover effect - maintaining position */
#btnNext:not(:disabled):hover {
    background-color: #45a049; /* Slightly darker green */
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.6); /* Slightly bigger shadow */
}

/* Active/pressed state - minimal movement */
#btnNext:not(:disabled):active {
    transform: scale(0.98); /* Subtle press effect without moving down */
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4); /* Smaller shadow */
}

/* Adjustments for no images message to fit in small height landscape */
@media (orientation: landscape) and (max-height: 600px) {
    #noImagesMessage {
        /* Make the container more compact */
        margin-top: 10px !important;
        padding: 10px;
    }

    #noImagesMessage .no-images-message {
        /* Reduce internal spacing */
        padding: 10px;
    }

    #noImagesMessage p {
        /* Make text smaller and reduce margins */
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    /* Make the icon smaller */
    #noImagesMessage .bi-images {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
        display: inline-block !important;
    }

    /* Display text on same line as icon for extreme space saving */
    @media (max-height: 450px) {
        #noImagesMessage p {
            /* Put icon and text on same line */
            display: flex;
            align-items: center;
            font-size: 0.85rem;
            margin-bottom: 3px;
        }

        #noImagesMessage .bi-images {
            font-size: 1.25rem !important;
            margin-right: 8px !important;
            margin-bottom: 0 !important;
        }

        /* Make the second paragraph more compact */
        #noImagesMessage p:last-child {
            font-size: 0.8rem;
            opacity: 0.8;
        }
    }
}

/* Additional optimization for extremely small heights */
@media (orientation: landscape) and (max-height: 350px) {
    #noImagesMessage {
        /* Further compress for very small heights */
        margin-top: 5px !important;
        padding: 5px;
    }

    /* Use a more compact layout with text and icon side-by-side */
    #noImagesMessage .no-images-message {
        display: flex;
        align-items: center;
        padding: 5px;
    }

    #noImagesMessage p {
        margin: 0 0 0 10px;
        font-size: 0.8rem;
    }

    /* Make second paragraph less prominent */
    #noImagesMessage p:last-child {
        display: none; /* Hide in extreme cases */
    }

    /* Icon adjustments */
    #noImagesMessage .bi-images {
        font-size: 1.1rem !important;
        margin: 0 !important;
    }
}

/* Enhanced styles for Take Photo button - visual changes only */

/* Base button styling - preserving position */
#btnTakePhoto, #btnTakePhoto2 {
    position: relative; /* Position relative but maintain original layout */
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Button enhancement - no positioning changes */
#btnTakePhoto, #btnTakePhoto2 {
    background-color: #4CAF50; /* Green color like other action buttons */
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    animation: photoButtonGlow 2.5s infinite alternate ease-in-out;
}

/* Pulsing glow animation - only affects shadow, not position */
@keyframes photoButtonGlow {
    0% {
        box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    }
    100% {
        box-shadow: 0 6px 15px rgba(76, 175, 80, 0.7);
    }
}

/* Add a sliding shine effect across the button */
#btnTakePhoto::before, #btnTakePhoto2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: photoButtonShine 3.5s infinite;
    pointer-events: none; /* Ensure it doesn't affect interactions */
    z-index: 1; /* Keep above the button but below text */
}

/* Add different timing for second button to avoid synchronization */
#btnTakePhoto2::before {
    animation: photoButtonShine 3.5s infinite 0.5s; /* 0.5s delay */
}

/* Sliding shine animation - no position changes */
@keyframes photoButtonShine {
    0%, 15% {
        left: -100%;
    }
    35%, 100% {
        left: 150%;
    }
}

/* Enhanced hover effect - maintaining position */
#btnTakePhoto:hover, #btnTakePhoto2:hover {
    background-color: #45a049; /* Slightly darker green */
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.6); /* Slightly bigger shadow */
}

/* Active/pressed state - minimal movement */
#btnTakePhoto:active, #btnTakePhoto2:active {
    transform: scale(0.98); /* Subtle press effect without moving down */
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4); /* Smaller shadow */
}

/* Ensure button keeps its original dimensions */
#btnTakePhoto i, #btnTakePhoto2 i,
#btnTakePhoto span, #btnTakePhoto2 span {
    position: relative;
    z-index: 2; /* Keep text/icon above the shine effect */
}

/* Specific adjustments for mobile layout */
@media (max-width: 767px) {
    /* Preserve existing button size/position on mobile */
    .take-photo-button-container #btnTakePhoto {
        /* Only affect appearance, not dimensions */
        box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
    }

    @keyframes photoButtonGlow {
        0% {
            box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
        }
        100% {
            box-shadow: 0 4px 10px rgba(76, 175, 80, 0.6);
        }
    }
}

/* Specific adjustments for landscape small height */
@media (orientation: landscape) and (max-height: 600px) {
    /* More subtle effects for small screens */
    #btnTakePhoto, #btnTakePhoto2 {
        box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
    }

    @keyframes photoButtonGlow {
        0% {
            box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
        }
        100% {
            box-shadow: 0 3px 8px rgba(76, 175, 80, 0.6);
        }
    }
}

/* Specific adjustments for very small screens */
@media (orientation: landscape) and (max-height: 450px) {
    /* Even more subtle effects */
    #btnTakePhoto::before, #btnTakePhoto2::before {
        width: 30%; /* Narrower shine */
    }
}