/*
 * Retreat Booking Manager - Frontend Styles
 */

/* Grid Layout for Retreats List */
.retreat-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Individual Retreat Card */
.retreat-item-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.retreat-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.retreat-item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Card Content Area */
.retreat-item-content {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Category/Tagline */
.retreat-item-category {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    min-height: 1em; /* Prevents layout shift if category is empty */
}
.retreat-item-category a {
    color: inherit;
    text-decoration: none;
}


/* Retreat Title */
.retreat-item-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.retreat-item-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.retreat-item-title a:hover {
    color: #007bff;
}

/* Excerpt/Content */
.retreat-item-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    flex-grow: 1; /* Pushes the button and info bar down */
}
.retreat-item-excerpt p {
    margin: 0;
}

/* Call to Action (Read More button container) */
.retreat-item-cta {
    margin-top: 20px; /* Space above the button */
    margin-bottom: 20px; /* Space below the button */
}


/* Info Bar (Price, Seats) - Separator line removed */
.retreat-item-info {
    margin-top: 20px; /* Replaces padding-top and border-top for cleaner spacing */
    display: flex;
    justify-content: space-around;
    font-size: 14px;
    color: #333;
}

.retreat-item-info span {
    font-weight: 600;
}

.info-price, .info-seats {
    display: flex;
    flex-direction: column;
}
.info-price span:first-child, .info-seats span:first-child {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
}

/* Responsive Grid: Switch to single column on smaller screens */
@media (max-width: 768px) {
    .retreat-list-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared Button Styles (for Pagination and Read More) */
.rb-pagination .page-numbers,
.rb-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    color: #007bff;
    transition: background-color 0.3s, color 0.3s;
    background-color: #fff;
}

.rb-pagination .page-numbers:hover,
.rb-pagination .page-numbers.current,
.rb-button:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    text-decoration: none;
}

.rb-pagination {
    text-align: center;
    margin-top: 40px;
}

/* Booking Form Styles */
.booking-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.booking-form-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.rb-booking-form .form-row {
    margin-bottom: 20px;
}

.rb-booking-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.rb-booking-form input[type="text"],
.rb-booking-form input[type="email"],
.rb-booking-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.rb-booking-form input:focus {
    border-color: #007bff;
    outline: none;
}

.rb-submit-button {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.rb-submit-button:hover {
    background-color: #0056b3;
}

/* Spinner for loading state */
.rb-submit-button .spinner {
    display: none;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 20px;
    top: 50%;
    margin-top: -10px;
}

.rb-submit-button.loading .spinner {
    display: inline-block;
}

.rb-submit-button.loading .button-text {
    opacity: 0.8;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Messages */
.rb-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.rb-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rb-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.fully-booked-message {
    text-align: center;
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 4px;
}

/* Final Retreat Details Block Styles */
.retreat-details-wrapper-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start; /* Align items to the top */
    padding: 20px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 40px auto;
    gap: 90px; /* Increased space between items */
}

.detail-item {
    display: flex;
    align-items: flex-start; /* Align icon with the top of the text content */
    gap: 15px;
}

.detail-item .dashicons {
    font-size: 28px;
    color: #dc3545; /* Red icon color */
    margin-top: -2px; /* Fine-tune vertical alignment with the title */
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: bold;
    font-size: 14px;
    color: #212529;
}

.detail-value {
    font-size: 15px;
    color: #495057;
}

/* Remove old list styles for details block */
.retreat-details-wrapper,
.retreat-details-list {
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    list-style: none;
}
.retreat-details-list li {
    padding: 0;
    border: none;
}

/* --- Fully Responsive Retreat Slider Styles --- */

/* 1. Main slider container */
.rb-retreat-slider.splide {
    visibility: hidden; /* Hide the slider until it is initialized to prevent flash of unstyled content */
}
.rb-retreat-slider.is-initialized {
    visibility: visible;
}

/* 2. Make slider images responsive */
.rb-retreat-slider .splide__slide img {
    width: 100%;       /* Makes the image fill the container's width */
    height: auto;      /* Maintains the aspect ratio */
    display: block;    /* Removes any extra space below the image */
}

/* 3. Arrow Styling and Positioning */
.rb-retreat-slider .splide__arrows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicks to go through to the image if needed */
    z-index: 10;
}

.rb-retreat-slider .splide__arrow {
    pointer-events: all; /* Makes the arrows clickable */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3em;
    height: 3em;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.rb-retreat-slider .splide__arrow:hover {
    opacity: 1;
}

.rb-retreat-slider .splide__arrow svg {
    fill: #ffffff;
    width: 1.2em;
    height: 1.2em;
}

/* 4. Correct Arrow Placement */
.rb-retreat-slider .splide__arrow--prev {
    left: 1em;
}

.rb-retreat-slider .splide__arrow--next {
    right: 1em;
}

/* 5. Mobile Responsiveness for Arrows */
@media (max-width: 768px) {
    .rb-retreat-slider .splide__arrow {
        width: 2.5em;
        height: 2.5em;
    }
    .rb-retreat-slider .splide__arrow--prev {
        left: 0.5em;
    }
    .rb-retreat-slider .splide__arrow--next {
        right: 0.5em;
    }
}

/* --- Rounded Slider Styles --- */
.rb-retreat-slider.splide,
.rb-retreat-slider .splide__track {
    border-radius: 30px; /* Adjust this value for more or less rounding */
    overflow: hidden;    /* Important: This clips the images to the container's rounded corners */
}