

* {
    /*font-family: sans-serif;*/
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
}

body {
    background-color: white;
    color: black;
    position: relative;

    /* verhindern, dass die Seite im Safari-Mobil-Browser (iOS) durch das "Pull-to-Refresh"-Verhalten neu geladen wird */
    overscroll-behavior-y: contain;
    height: 100vh;
    overflow-y: auto;
}

.ay-topbar {
    z-index: 8888;
    position: fixed;
    top: 3px;
    left: 3px;
}
.ay-topbar div {
    display: inline-block;
    margin-right: 5px;
}

.ay-menu {
/*    position: absolute;
    top:3px;
    left: 3px;*/
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
    text-align:center;
    color:black;
    width:30px;
    height:30px;
    line-height: 33px;
    cursor: pointer;
}

.ay-year {
    /*position: absolute;
    top:3px;
    left: 45px;*/
    border-radius: 5px;
    background-color: rgba(255,255,255,0.9);
    padding:3px 7px;
    text-align:center;
    color:black;
    cursor: pointer;
}


.ay-jump-down {
    /*position: absolute;
    top:3px;
    left: 160px;*/
    border-radius: 5px;
    background-color: rgba(255,255,255,0.9);
    padding:3px 7px;
    text-align:center;
    color:black;
    cursor: pointer;
}
.ay-jump-up {
    /*
    position: absolute;
    top:3px;
    left: 120px;*/
    border-radius: 5px;
    background-color: rgba(255,255,255,0.9);
    padding:3px 7px;
    text-align:center;
    color:black;
    cursor: pointer;
}

.ay-sidebar {
    background-color: white;
    color: black;
    position: absolute;
    top:0;
    bottom: 0;
    overflow: auto;
    width: 70vw;
    height: 100vh;
    left: -70vw;
    transition: all 0.3s ease;
    z-index: 8899;
}

.ay-sidebar.open {
    left: 0;
}
.ay-close-sidebar {
    cursor: pointer;
}

.ay-sidebar a {
    text-decoration: none;
    color: black;
}



.ay-yearbar {
    background-color: white;
    color: black;
    position: absolute;
    top:0;
    bottom: 0;
    overflow: auto;
    width: 70vw;
    height: 100vh;
    left: -70vw;
    transition: all 0.3s ease;
    z-index: 8899;
}

.ay-yearbar.open {
    left: 0;
}
.ay-close-yearbar {
    cursor: pointer;
}





.ay-month-title {
    padding:5px 10px;
    color: black;
    font-weight: bold;
}

.ay-topbar div.ay-toggle-map-coord {
    color: black;
    display: inline-block;
    cursor: pointer;
}
.ay-topbar div.ay-toggle-map-coord a {
    color: black;
}
.ay-topbar div.ay-toggle-map-radius {
    display: none;
}

.ay-faces {
    display: none;
    position: absolute;
    top: 40px;
    left:0;
    right:0;
    height: calc(100vh - 40px);
    overflow:auto;
    z-index: 1;
}

.ay-person-block {
    margin-bottom: 30px;
    padding: 10px;
}

.ay-person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
}

.ay-person-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ay-person-name {
    font-size: 18px;
    font-weight: bold;
    color: black;
    flex: 1;
}

.ay-person-id {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}
.ay-person-faces-count {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.ay-assign-person-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.ay-assign-person-btn:hover {
    background-color: #45a049;
}

.ay-assign-person-btn:active {
    background-color: #3d8b40;
}

.ay-delete-cluster-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ay-delete-cluster-btn:hover {
    background-color: #da190b;
}

.ay-delete-cluster-btn:active {
    background-color: #c62828;
}

.ay-delete-cluster-btn i {
    font-size: 14px;
}

.ay-person-faces {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
    max-height: 120px; /* Eine Reihe Bilder (100px + gap) */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ay-person-faces.expanded {
    max-height: none;
}

.ay-expand-cluster-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ay-expand-cluster-count {
    font-size: 12px;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.25);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.ay-expand-cluster-btn:hover {
    background-color: #0b7dda;
}

.ay-face-image {
    height: 100px;
    width: 100px; /*auto;*/
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    background-color: #eee;
}

.ay-error {
    padding: 20px;
    color: red;
    text-align: center;
}

.ay-map {
    display: none;
    position: absolute;
    top: 40px;
    left:0;
    right:0;
    height: calc(100vh - 40px);
    overflow:hidden;
    z-index: 1;
}
.mapimg {
    height: 300px;
    max-width: 80vw;
    max-height: 80vh;
}
.leaflet-popup-content {
    width: auto !important;
}

.ay-pics {
    background-color: #eee;
    position: absolute;
    top: 40px;
    left:0;
    right:0;
    height: calc(100vh - 40px);
    overflow:auto;
    z-index: 1;
}

.ay-day-title {
    padding: 0 0 5px 10px;
    text-align: left;
}


.ay-pic {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.ay-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0, 1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}



.ay-detail-image, .ay-detail-image2 {
    width: 100vw;
    height: calc(100vh - 100px);
    top: 50px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.ay-detail-stack-icon {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10005;
    cursor: pointer;
    color: white;
    font-size: 1.8em;
    background-color: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.ay-detail-stack-icon:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.ay-filmstrip-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10002;
    display: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.ay-filmstrip-track {
    display: flex;
    height: 100px;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
}

.ay-filmstrip-track:active {
    cursor: grabbing;
}

.ay-filmstrip-item {
    height: 100px;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: opacity 0.15s;
}

.ay-filmstrip-item.ay-filmstrip-active {
    opacity: 1;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 0, 0.8);
}

.ay-filmstrip-item.ay-filmstrip-video::after {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2em;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}
.fa-info-circle.ay-info {
    color: white;
}
.ay-detailinfo-close, .ay-detail-close {
    position: fixed;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: white;
    color: black;
    border-radius: 50%;
}

.ay-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    color: white;
    cursor: pointer;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.ay-prev-arrow {
    left: 0;
}

.ay-next-arrow {
    right: 0;
}

.ay-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.ay-detail-actions {
    color: white;
    position: fixed;
    left: 10px;
    top:10px;
    z-index: 1001;
}
.ay-detail-actions  a {
    color: white;
}

.ay-detail-actions i {
    font-size:2.2em;
    margin-right: 15px;
}

.ay-detail-likes {
    position: fixed;
    right: 10px;
    bottom:10px;
}

.ay-detail-likes i {
    font-size:2.2em;
    margin-left: 15px;
}

.ay-day-block {
    padding-top: 5px;
}

.ay-detail-geo {
    position:fixed;
    bottom: 2px;
    left: 0px;
    right: 130px;
    text-align:left;

}
.ay-detail-geo2 {
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    border-radius: 5px;
    display: inline-block;
    font-size: 0.9em;
}

.ay-detail-geo3 {
    color: white;
    display: inline-block;
    font-size: 0.9em;
    padding: 5px 10px;
}

i.ay-like {
    color: white;
}
i.ay-like-active {
    color: rgb(128, 0, 50);

}

.ay-thumb-like {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 1.2em;
    color: rgb(128, 0, 50);
    text-shadow: 0 0 3px rgba(255,255,255,0.8);
    z-index: 2;
    display: none;
    pointer-events: none;
}
.ay-thumb-like.ay-thumb-like-active {
    display: block;
}

.detailinfo {
    position: fixed;
    top: 5px;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
    z-index: 9999;
    border: solid 1px gray;
    /*border-radius: 20px;*/
    overflow: auto;
}

.ay-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10003;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ay-dialog {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    min-width: 400px;
    max-width: 90vw;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.ay-dialog-header {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    color: black;
}

.ay-dialog-content {
    padding: 20px;
}

.ay-dialog-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: black;
}

.ay-real-name-select,
.ay-target-cluster-select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 15px;
    background-color: white;
    cursor: pointer;
}

.ay-real-name-select:focus,
.ay-target-cluster-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.ay-target-cluster-select {
    min-height: 200px;
    max-height: 400px;
}

.ay-target-cluster-select option {
    padding: 8px;
}

.ay-dialog-separator {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

.ay-real-name-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ay-real-name-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.ay-dialog-buttons {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ay-dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.ay-dialog-cancel {
    background-color: #f0f0f0;
    color: black;
}

.ay-dialog-cancel:hover {
    background-color: #e0e0e0;
}

.ay-dialog-save {
    background-color: #4CAF50;
    color: white;
}

.ay-dialog-save:hover {
    background-color: #45a049;
}

.ay-face-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ay-face-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    overflow: hidden;
}

.ay-face-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    flex-shrink: 0;
}

.ay-face-modal-album-link {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    text-decoration: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.ay-face-modal-album-link:hover {
    background-color: rgba(255, 255, 255, 1);
}

.ay-face-modal-album-link i {
    font-size: 16px;
}

.ay-face-modal-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 10px;
}

.ay-face-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    flex-shrink: 0;
}

.ay-face-modal-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid white;
}

.ay-face-modal-assign-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.ay-face-modal-assign-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.ay-face-modal-assign-btn i {
    font-size: 16px;
}

.ay-face-modal-close {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.ay-face-modal-close:hover {
    background-color: rgba(255, 255, 255, 1);
}

.ay-face-modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
