/* Grid-Container-Styles */
.horizontal-scroll-container {
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    padding-bottom: 60px;
    position: relative;
    z-index: 5;
}

/* Nur auf der Sponsor-Seite spezifische Styles */
body.page-sponsor-werden .horizontal-scroll-container {
    overflow: hidden;
}

.grid-wrapper {
    position: relative;
    width: max-content;
    padding-right: calc(100vw - 1000px);
}

/* Grid-Box-Styles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(240, 50px);
    grid-template-rows: repeat(10, 50px);
    gap: 1px;
    background-color: #fff;
    padding: 1px;
    width: max-content;
}

.grid-box {
    width: 100%;
    height: 100%;
    background-color: white;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url('../images/rasen.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.grid-box.has-logo {
    background-color: rgba(255, 255, 255, 0.9);
}

.grid-box:not(.has-logo):hover {
    filter: brightness(80%);
}

.grid-box:not(.has-logo).selected {
    filter: brightness(50%);
}

.grid-box:not(.has-logo).locked {
    background-color: rgba(0, 0, 0, 0.6);
    cursor: not-allowed;
    pointer-events: none;
    filter: brightness(30%);
}

/* Spaltennummerierung mit korrigiertem Abstand */
.column-numbers {
    display: grid;
    grid-template-columns: repeat(240, 50px);
    gap: 1px;
    padding: 5px 1px;
    background-color: white;
    position: relative;
    margin-top: 20px;
    z-index: 15;
    width: max-content;
}

.column-number {
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Jede 5. Nummer hervorheben */
.column-number:nth-child(5n+3) {
    color: #008854;
    font-size: 14px;
    font-weight: 600;
    transform: scale(1.4);
}

/* Orientierungsmarker */
.grid-marker {
    position: absolute;
    top: -23px;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--wp--preset--font-family--poppins) !important;
    color: #008854;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 20;
    background-color: white;
    padding: 0 10px;
}

.marker-left {
    left: calc(1 * 51px - 26px);
}

.marker-middle {
    left: calc(120 * 51px - 26px);
}

.marker-right {
    left: calc(240 * 51px - 26px);
}

/* Scroll-Indikatoren */
.scroll-indicators {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.scroll-indicators.visible {
    opacity: 1;
    animation: slideOut 10s forwards;
}

.scroll-indicator {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.scroll-indicator::before {
    content: attr(data-hint);
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: var(--wp--preset--font-family--poppins);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-indicators.visible .scroll-indicator::before {
    opacity: 1;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: #4CAF50;
}

@keyframes slideOut {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw * var(--direction)));
    }
}

.scroll-indicator.left {
    --direction: -1;
    animation: wiggleLeft 1s ease-in-out infinite;
}

.scroll-indicator.right {
    --direction: 1;
    animation: wiggleRight 1s ease-in-out infinite;
}

@keyframes wiggleLeft {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-10px);
    }
}

@keyframes wiggleRight {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

/* Entferne alte Scroll-Indikatoren */
.scroll-arrow-indicator,
.scroll-gradient,
.scroll-hint,
.scroll-text,
.scroll-arrow {
    display: none;
}

/* Scroll-Hinweis */
.scroll-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    font-family: var(--wp--preset--font-family--poppins);
    animation: fadeIn 0.5s ease-out;
    pointer-events: none;
}

.scroll-hint-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.scroll-hint-icon {
    font-size: 24px;
    color: #008854;
    margin-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

.scroll-hint.hiding {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .horizontal-scroll-container {
        width: 100%;
    }

    .grid-wrapper {
        width: 100%;
        padding-right: calc(100vw - 280px);
    }

    .grid-container {
        grid-template-columns: repeat(240, 40px);
        grid-template-rows: repeat(10, 40px);
        width: max-content;
        min-width: 100%;
    }

    .column-numbers {
        grid-template-columns: repeat(240, 40px);
        width: max-content;
        min-width: 100%;
    }

    .marker-left {
        left: calc(1 * 41px - 21px);
    }

    .marker-middle {
        left: calc(120 * 41px - 21px);
    }

    .marker-right {
        left: calc(240 * 41px - 21px);
    }

    .scroll-indicators {
        padding: 0 20%;
    }

    .scroll-indicator {
        width: 50px;
        height: 50px;
    }

    .scroll-indicator svg {
        width: 25px;
        height: 25px;
    }

    .scroll-indicator::before {
        white-space: normal;
        width: 120px;
        text-align: center;
        font-size: 12px;
        line-height: 1.3;
        top: -60px;
    }
}

/* Preloader Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

body.loading #loading-screen {
    pointer-events: all;
}

body.loading {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 999999;
    pointer-events: none;
}

body.loading .loading-content {
    pointer-events: all;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #008854;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

#loading-screen-progress {
    font-family: var(--wp--preset--font-family--poppins);
    font-size: 18px;
    font-weight: 600;
    color: #008854;
}

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

/* Stelle sicher, dass der Header über allen Grid-Elementen liegt */
#wpadminbar { z-index: 99999 !important; }
.wp-site-blocks { z-index: 1; }
#masthead, 
.site-header { 
    z-index: 1000 !important; 
    position: relative;
}
.main-navigation,
.menu-toggle,
.primary-navigation { 
    z-index: 1000 !important;
}

/* Toolbar Styles */
.grid-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
.grid-toolbar-button {
    padding: 10px 20px;
    font-family: var(--wp--preset--font-family--poppins) !important;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: #008854;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-toolbar-button:hover {
    background-color: #006c42;
    transform: translateY(-2px);
}

.grid-toolbar-button:active {
    transform: translateY(0);
}

/* Entferne die Ladeanimation für den Button */
.grid-toolbar-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Entferne die alte Ladeanimation */
.grid-toolbar-button:disabled::after {
    display: none;
}

@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Styles für Toolbar */
@media screen and (max-width: 768px) {
    .grid-toolbar {
        position: fixed;
        bottom: 0;
        top: auto;
        padding: 10px;
        gap: 8px;
        background-color: white;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
        margin: 0;
        width: 100%;
        height: 90px;
        align-items: center;
        flex-direction: row;
        border-radius: 0;
        transition: transform 0.3s ease;
    }

    .grid-toolbar.hide {
        transform: translateY(100%);
    }

    .horizontal-scroll-container {
        margin-top: 20px;
        margin-bottom: 120px;
    }

    .grid-toolbar-button {
        padding: 8px 12px;
        font-size: 11px;
        min-width: auto;
        flex: 1;
    }
}

/* Spendenstand Overlay */
.donation-stand-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    font-family: var(--wp--preset--font-family--poppins);
    animation: fadeIn 0.5s ease-out;
    pointer-events: none;
}

.donation-stand-overlay h3 {
    font-size: 24px;
    color: #008854;
    margin-bottom: 20px;
    font-weight: 600;
}

.donation-stand-overlay .amount {
    font-size: 36px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.donation-stand-overlay .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.donation-stand-overlay.hiding {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

.top-spender-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    font-family: var(--wp--preset--font-family--poppins);
    animation: fadeIn 0.5s ease-out;
    pointer-events: none;
}

.top-spender-overlay h3 {
    font-size: 24px;
    color: #008854;
    margin-bottom: 20px;
    font-weight: 600;
}

.top-spender-overlay .spender-info {
    margin-bottom: 20px;
}

.top-spender-overlay .name {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.top-spender-overlay .amount {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.top-spender-overlay .date {
    font-size: 16px;
    color: #666;
}

.top-spender-overlay .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.top-spender-overlay.hiding {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Hilfe-Button Styles */
.help-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.help-button:hover {
    background-color: #ff5252;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile Styles für den Hilfe-Button */
@media screen and (max-width: 768px) {
    .help-button {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        width: 50px;
        height: 50px;
        font-size: 28px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .help-button.visible {
        opacity: 1;
        visibility: visible;
    }
}

/* Logo-Overlay Styles */
.grid-logo-overlay {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.grid-box.has-logo {
    background-image: none;
    background-color: transparent;
    border: none;
    pointer-events: none;
    opacity: 0;
}

/* Einreichungsformular Styles */
.coordinate-submission-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    color: #333;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.form-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-group input[type="email"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus {
    border-color: #008854;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 136, 84, 0.1);
}

.file-upload-container {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-upload-container:hover {
    border-color: #008854;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: #666;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #008854;
    display: none;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: #008854;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-button:hover {
    background: #007a4a;
}

.submission-message {
    max-width: 600px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.submission-message.success {
    background: #d4edda;
    color: #155724;
}

.submission-message.error {
    background: #f8d7da;
    color: #721c24;
}

.message-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .coordinate-submission-form {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Help Popover Styles */
.grid-popover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.grid-popover-content {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.grid-popover-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.grid-popover-close:hover {
    transform: scale(1.1);
}

.help-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
}

.help-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.help-content ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #666;
    line-height: 1.5;
}

.help-content li {
    margin-bottom: 8px;
}

#help-button {
    width: 40px;
    height: 40px;
    font-family: var(--wp--preset--font-family--poppins) !important;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: #008854;
    border: none;
    border-radius: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    padding: 0;
}

#help-button:hover {
    background-color: #006c42;
    transform: translateY(-2px);
}

#help-button:active {
    transform: translateY(0);
}

/* Mobile Styles für den Help-Button */
@media screen and (max-width: 768px) {
    #help-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}


