/* Modal Overlay */
.gift-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

/* Modal Container */
.gift-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

/* Modal Title */
.gift-modal-title {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

/* Schließen-Button */
.gift-modal-close {
    position: absolute;
    top: 0px;
    right: 20px;
    font-size: 2.5em;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.gift-modal-close:hover {
    color: var(--main-color);
}

/* Standard: Desktop → Snapping (overflow hidden) */
.gift-picker-wrapper {
    height: calc(77px * 5 + 10px * 4); /* 5 Reihen + Abstand */
    overflow-y: hidden;
    margin-bottom: 20px;
    padding: 5px 0;
}

/* Ab einer gewissen Breite (z.B. 768px) → Mobile: normales Scrolling */
@media (max-width: 768px) {
    .gift-picker-wrapper {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* für iOS smooth scrolling */
        /* Optional: max-height, falls du die Höhe anpassen willst */
        max-height: calc(77px * 5 + 10px * 4);
    }
}

/* Geschenk-Grid */
.gift-picker {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Standard: 7 Geschenke nebeneinander */
    grid-auto-rows: 75px;
    gap: 10px;
    scroll-snap-type: y mandatory;
}

/* Responsive Anpassung für Mobile */
@media (max-width: 768px) {
    .gift-picker {
        grid-template-columns: repeat(3, 1fr); /* 3 Geschenke nebeneinander */
    }
}

/* Radio Buttons ausblenden */
.gift-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Geschenk-Item zentrieren */
.gift-item {
    display: flex;
    align-items: center; /* Vertikale Zentrierung */
    justify-content: center; /* Horizontale Zentrierung */
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

.gift-item img {
    width: 75px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
}

.gift-item input[type="radio"]:checked + img {
    border-color: var(--main-color);
    box-shadow: 0 0 8px rgba(61, 52, 105, 0.8);
}

/* Senden-Button */
.gift-submit-container {
    text-align: center;
}

.gift-submit-btn {
    width: 100%; /* Volle Breite */
    background-color: var(--main-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.gift-submit-btn:hover {
    opacity: 0.85;
}