/* Styles for Edit Mode */

#edit-mode-banner {
    background-color: #0d6efd; /* Bootstrap primary blue */
    color: white;
    text-align: center;
    padding: 10px 40px; /* Add padding to avoid text hitting the close button */
    position: fixed; /* Changed from relative to fixed */
    top: 0; /* Pin to the top */
    left: 0; /* Pin to the left */
    right: 0; /* Pin to the right */
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    z-index: 1060; /* Higher than Bootstrap modals (1055) */
    line-height: 1.5;
}

#edit-mode-banner .close-banner-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 5px;
}

#edit-mode-banner .close-banner-btn:hover {
    opacity: 1;
}

.editable {
    /* Add a subtle transition for a smoother hover effect */
    transition: outline-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;

    /* Make the outline always visible for touch devices */
    outline: 2px dashed rgba(0, 170, 255, 0.7);
    outline-offset: 4px; /* Give it some space from the text */
    border-radius: 8px; /* Soften the corners of the outline */
    cursor: pointer;
}

.editable:hover {
    /* On hover, make the outline and shadow more prominent for desktop users */
    outline-color: #00aaff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

/* Unsplash Search Modal Styles */
.unsplash-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    min-height: 200px; /* Ensure it has some height even when empty */
}

.unsplash-thumbnail {
    width: 100%;
    padding-top: 60%; /* Creates an aspect ratio, e.g., 100/60 = 5:3 */
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.unsplash-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.7);
    border-color: rgba(0, 170, 255, 0.7);
}

/* Styles for the Timezone List in the modal */
#timezone-list {
    height: 40vh; /* Use a fixed height to prevent the modal from resizing */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border for definition */
    border-radius: 0.375rem; /* Match Bootstrap's default border-radius */
}

.unsplash-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Adjust the fixed button menu when the edit banner is active */
body.edit-mode-active .button-menu {
    top: var(--edit-banner-height, 42px); /* 42px is a fallback */
    transition: top 0.3s ease;
}
