body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

p {
    margin: 0;
}

.hidden {
    display: none;
}

main {
    padding: 12px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #333;
}
.store-edit label {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

body:not(.logged-in) .store-actions {
    display: none;
}

.store-edit input[type="text"], .store-edit textarea {
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

.store-edit input[type="text"]:focus, .store-edit textarea:focus {
    border-color: #0056b3;
    outline: none;
}

.store-edit {
    flex-direction: column;
    padding: 10px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
}

.store-actions.new {
    .delete-store, .sort-down, .sort-up, .add-before {
        display: none;
    }
}

.new-marker {
    display: none;
    width: max-content;
    background-color: #0056b3;
    color: #fff;
    border: 0;
    padding: 10px;
    cursor: default;
    writing-mode: vertical-rl;
    border-radius: 4px 0 0 4px;
    text-align: center;
    p {
        margin: 0;
    }
}

.btn-group {
    display: flex;
    width: max-content;
    border-radius: 4px; /* Round the outside of the button group */
    overflow: hidden; /* Ensure inner buttons don't overflow */
}


.btn {
    background-color: #fff;
    border: 0;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
    color: grey;
    border-radius: 4px; /* Round the outside of the button group */
    margin: 4px;
}

.btn-group .btn {
    border-radius: 0;

    margin: 0;
    flex-grow: 1;
}


.btn-group:not(.vertical) .btn:not(:last-child) {
    border-right: 1px solid #ddd; /* Small line between buttons */
}

.btn-group.vertical .btn {
    border-bottom: 1px solid #ddd; /* Small line between buttons */
}

.btn:hover {
    background-color: #ccc;
}

.btn:disabled, .btn[disabled] {
     background-color: #e0e0e0;
     color: #a0a0a0;
     cursor: unset;
 }

.btn-group.vertical .btn:first-child {
    border-top-right-radius: 4px; /* Round the top-left corner */
}
.btn-group .btn:last-child {
    border-bottom: none; /* Remove border from the last button */
    border-bottom-right-radius: 4px; /* Round the bottom-right corner */
}

.btn-group:not(.vertical) .btn:last-child {
    border-right: none; /* Remove border from the last button */
}

.store-list {
    flex-direction: column;
    align-items: start;
    gap: 10px;

    .btn-group {
    }
}

.store-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.store {
    justify-content: space-between;
    align-items: stretch;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;

}

.store-content, .btn-group.store-actions, .new-marker {
    flex-direction: column;
    justify-content: center;
}

.store-content {
    position: relative;
    justify-content: space-between;
    align-items: stretch;

    flex: 1;
}

.store-info {
    flex-direction: row;
}

.store-info, .store-edit {
    display: flex;
    box-sizing: border-box;
    flex-wrap: wrap;

    height: 100%;
    align-items: stretch;

    img {

        border-radius: 8px 8px 0 0;
        @media (min-width: 576px) {

            border-radius: 8px 0 0 8px;
        }

        max-width: 100%;
        object-fit: cover;
    }

    .store-text {
        flex: 1;
        padding-top: 10px;
        padding-left: 10px;
        padding-bottom: 10px;
    }

}
.store-header {
    justify-content: space-between;
    align-items: center;
}

.store-district {
    font-size: 1em;
    color: #777;
    display: inline-block;
}

.store-name {
    font-size: 1.2em;
    color: #333;
    text-align: left;
    display: inline-block;
    margin-right: 10px;
    margin-top: 0;
    margin-bottom: 0;
}

.store-district {
    font-size: 1em;
    color: #777;
    display: inline-block;
}

/* Remove border radius from the left side of the buttons */
.store-actions, .store-actions .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.store-actions {
    display: flex;
    border-left: 1px solid #ddd;
}

.store-button:hover {
    background-color: #0056b3;
}

/* Edit form visibility */
.store-content:not(.editing) > .store-edit {
    display: none;
}
.editing > .store-info {
    display: none;
}

/* Card hover effect */
.clickable {
    cursor: pointer; /* Make the entire card act as a button */
}

.clickable:hover {
    background-color: #f0f0f0; /* Add a hover effect */
}

.clickable::after {
    content: 'Click to visit';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
    color: #777;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1; /* Ensure the hint appears above other elements */
}

.clickable:hover::after {
    opacity: 1; /* Show hint on hover */
}


/* Edit button visibility */
:not(.editing) > * > .save-icon {
    display: none;
}
.editing .edit-icon {
    display: none;
}

.alert-banner {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    background-color: #ffcc00; /* Yellow background */
    color: #333; /* Dark text color */
    text-align: center;
    padding: 15px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    border: 1px solid #e6b800; /* Slightly darker border */
}

main {
    margin-bottom: 32px;
}

/* ##### Footer ##### */
footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-top: 1px solid #dee2e6;
    position: relative;
    color: gray;
}

footer .login-form {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    background-color: #f8f9fa;
    padding: 10px;
    position: relative;
    color: gray;
    width: max-content;
    max-width: 50vw;
}

footer .login-form label {
    margin: 0 5px;
}

footer .login-form input {
    margin-left: 5px;
    border: none;
    border-bottom: 1px solid #ccc;
    background-color: transparent;
    padding: 5px;
    outline: none;
}

.logged-in .btn.login {
    display: none;
}

body:not(.logged-in) .btn.logout {
    display: none;
}

header {
    position: sticky;
    z-index: 1;
    top: 0;
    background-color: #365AA4;
    width: 100%;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

header.shrink {
    padding: 5px;
    text-align: left;
}

header h1 {
    color: #e0e0e0;
}

header.shrink h1 {
    font-size: 1.2em;
    text-align: left;
}

#login-err {
    color: red;
    padding: 4px;
}

#sorting-selector {
    margin-bottom: 8px;
}