/* Container for all events */
.our-events-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
}

/* Single Event Card */
.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 300px;
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Covers the image and text */
    cursor: pointer;
}

.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-card-info {
    padding: 1rem 1.5rem;
    text-align: center;
    flex: 1;
    /* Grows to fill the empty vertical space */
    display: flex;
    /* Enables flex layout inside this container */
    flex-direction: column;
    /* Stacks content vertically */
}

.event-card-location {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.event-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-card-date,
.event-card-price {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #555;
}

.vinos-event-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: crimson;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quantity-selector,
.btn-buy-tickets {
    position: relative;
    z-index: 2;
}

.btn-buy-tickets {
    display: block;
    /* Makes it take up the full line */
    width: 100%;
    /* Forces it to fill the container */
    box-sizing: border-box;
    /* Ensures padding doesn't add to the width (prevents overflow) */
    background-color: #f1b863;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    /* Adjusted side padding slightly, vertical stays 0.75rem */
    border: none;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    position: relative;
    z-index: 2;
}

.btn-buy-tickets:hover {
    background-color: #e5c846;
    transform: scale(1.05);
}

.btn-buy-tickets:active {
    background-color: #ca9c38;
    transform: scale(0.98);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 1rem;
}

.qty-btn {
    background-color: #f1b863;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 0.3rem 0.8rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    touch-action: manipulation;
}

.qty-btn:hover {
    background-color: #e5c846;
    transform: scale(1.1);
}

.qty-btn:active {
    background-color: #ca9c38;
    transform: scale(0.95);
}

.qty-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.25rem 0;
}

.stock-message {
    font-size: 0.85rem;
    font-weight: bold;
    color: #e74c3c;
    /* Red color for alerts */
    margin-bottom: 0.5rem;
    min-height: 1.2rem;
    /* Prevents layout jump when empty */
}

.btn-buy-tickets.disabled,
.qty-btn:disabled {
    background-color: #ccc;
}

.hidden {
    display: block;
    visibility: hidden;
    margin: 0;
}

/* --- Overlay (Grey Background) --- */
.status-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* Grey/Black transparency */
    z-index: 2000;
    /* High z-index to cover header */
    display: flex;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.status-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* --- Modal Base Styles --- */
.status-modal {
    background-color: #fff;
    padding: 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease-out;
}

.status-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-family: 'Google Sans Flex', sans-serif;
}

.status-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.status-close-btn {
    background-color: #f1b863;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

/* --- MOBILE: Bottom Sheet --- */
@media (max-width: 767px) {
    .status-overlay {
        align-items: flex-end;
        /* Pushes content to bottom */
    }

    .status-modal {
        width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
        /* Round top corners */
        transform: translateY(0);
    }

    /* Animation state for hidden */
    .status-overlay.hidden .status-modal {
        transform: translateY(100%);
    }
}

/* --- DESKTOP: Center Popup --- */
@media (min-width: 768px) {
    .status-overlay {
        align-items: center;
        justify-content: center;
    }

    .status-modal {
        width: 400px;
        max-width: 90%;
        border-radius: 1rem;
        transform: scale(1);
    }
}

.status-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Style the input field */
.status-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
    /* Ensures padding doesn't break width */
    outline: none;
    transition: border-color 0.2s;
}

.status-input:focus {
    border-color: #333;
}

/* Ensure the form takes full width */
#email-form {
    width: 100%;
}

/* Style the 'No thanks' secondary button */
.status-cancel-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 0.9rem;
    margin-top: 1rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.5rem;
}

.status-cancel-btn:hover {
    color: #666;
}