/* Upload indicators for photo uploads */
.photo-upload.uploading .photo-preview-container {
    position: relative;
}

.upload-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 4px;
}

.upload-indicator .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.upload-indicator .upload-text {
    color: white;
    font-size: 14px;
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar for uploads */
.upload-progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 11;
}

.upload-progress-bar {
    height: 100%;
    background: #7D6B52;
    width: 0%;
    transition: width 0.3s ease-in-out;
}

/* Styling for the spinner overlay */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none; /* hidden by default; shown only when .is-visible */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.spinner-overlay.is-visible {
    display: flex !important;
}

.spinner-overlay .spinner {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 6px solid #fff;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.spinner-overlay .message {
    font-size: 18px;
    text-align: center;
    max-width: 80%;
    margin-top: 20px;
}

.force-close-button {
    margin-top: 30px;
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.force-close-button:hover {
    background-color: #c82333;
}

.emergency-close-button {
    margin-top: 15px;
    padding: 15px 25px;
    background-color: #ff0000;
    color: white;
    border: 3px solid yellow;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-display {
    margin-top: 20px;
    font-size: 14px;
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 4px;
}

.force-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Error styling */
.upload-error {
    background: rgba(220, 53, 69, 0.8) !important;
}

.upload-error .upload-text {
    color: white;
}

/* Global notifications: ensure toasts are visible above any overlays */
#global-notification-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100000; /* higher than .spinner-overlay (9999) */
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none; /* allow clicks to pass through */
}

.global-notification {
    pointer-events: auto;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
