/* ==========================================================================
   RESERVATION BOX UI - CORE FUNCTIONALITY (PLUGIN)
   ========================================================================== */

/* Core Card Structure (Vertical Stack) */
.grr-card-grid {
    display: flex;
    flex-direction: column;
}

/* Revert the second grid (Duration) back to a horizontal row */
.grr-reservation-box .grr-card-grid:last-of-type {
    flex-direction: row;
}

/* Ensure the horizontal duration boxes share the space equally */
.grr-reservation-box .grr-card-grid:last-of-type .grr-card {
    flex: 1;
}

.grr-card {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

/* State Logic: Visibility & Interaction */
.grr-card.rented,
.grr-card.selected {
    opacity: 1 !important;
}

.grr-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

#grr-reserve-button {
    cursor: pointer;
}

#grr-reserve-button:disabled {
    cursor: not-allowed;
}


/* ==========================================================================
   POPUP MODAL - CORE FUNCTIONALITY (PLUGIN)
   ========================================================================== */

/* Force the overlay to float above the document flow */
.grr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base constraints and structural positioning for the modal box */
.grr-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Structural placement for the close button */
.grr-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.grr-close-btn:hover { 
    color: #000; 
}

/* Form input structural constraints */
.grr-form-group { 
    margin-bottom: 15px; 
}

.grr-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Force the duration boxes to share a single row evenly */
.grr-reservation-box .grr-card-grid:last-of-type {
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Prevents the 30-day box from dropping to a new line */
}

/* Ensure all three boxes take up exactly 33.3% of the space */
.grr-reservation-box .grr-card-grid:last-of-type .grr-card {
    flex: 1 1 0 !important; 
    min-width: 0 !important; /* Removes the 130px barrier so they fit */
    padding: 10px 5px !important; /* Slightly tighter horizontal padding so the text doesn't touch the edges */
}

/* The circular spinner animation */
.grr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: grr-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes grr-spin {
    to { transform: rotate(360deg); }
}

/* The class that locks the entire page/modal */
.grr-submission-lock {
    pointer-events: none !important; /* Neutralizes all clicks on the page */
    user-select: none; /* Prevents text highlighting */

}

/* Style for the button when it's loading */
.grr-btn-loading {
    cursor: not-allowed !important;
    background-color: #0081cc !important; /* Slightly darker blue */
}