/* General body and page styles */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1 {
    color: #3c3c3c;
}

textarea {
    width: 100%;
    height: 150px;
    margin: 10px 0;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    resize: none;
}

button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Prayer Wall */
#prayerWall {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
    min-height: 80vh;
    width: 100%;
    background-color: #fff;
    overflow: hidden;
}

/* Default styles for prayer notes */
.prayerNote {
    position: relative;
    width: 200px; /* Default width for desktop */
    height: auto; /* Default height for content-based adjustments */
    padding: 15px;
    background: linear-gradient(145deg, #f8e71c, #f0c50f);
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15), -5px -5px 15px rgba(255, 255, 255, 0.7);
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    text-align: center;
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    animation: popIn 0.5s ease-out;
}

/* Mobile view */
@media (max-width: 767px) {
    #prayerWall {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two columns */
        gap: 10px; /* Adjust gap between sticky notes */
        padding: 0 15px; /* Add padding on left and right to create space */
        margin: 0 auto; /* Ensure it's centered */
        margin-top: 15px;
        width: 100%; /* Make sure it uses full width of its container */
        box-sizing: border-box;
    }

    .prayerNote {
        width: 100%; /* Ensure the note takes up available space */
        max-width: 175px; /* Limit the width to 175px */
        height: 200px; /* Fixed height for all sticky notes on mobile */
        padding: 15px;
        overflow: hidden;
        box-sizing: border-box;
        margin: 0 auto; /* Center the note */
    }

    .read-more {
        margin-top: auto; /* Ensure Read More button is at the bottom */
        padding-top: 10px;
    }
}

/* Desktop view */
@media (min-width: 768px) {
    #prayerWall {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 10px; /* Adjust gap between sticky notes */
        padding: 10px 20px; /* Add padding to left and right for spacing */
        margin: 0 auto; /* Ensure content is centered */
        max-width: 100%; /* Allow the width to be full */
        box-sizing: border-box;
    }

    .prayerNote {
        width: 200px; /* Fixed width for desktop */
        height: 275px; /* Auto height for desktop, based on content */
        padding: 15px;
        margin: 0 auto; /* Center notes inside the grid */
    }

    .read-more {
        margin-top: auto; /* Ensure Read More button is at the bottom */
    }
}

/* Read More Button */
.read-more {
    font-size: 12px;
    color: inherit; /* Inherit the color from the content */
    cursor: pointer;
    text-decoration: underline;
    margin-top: auto;
    text-align: center;
    display: block;
    padding-top: 10px;
}

.read-more:hover {
    color: #0056b3;
}

/* Lightbox styling */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    text-align: center;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    padding: 10px 10px;
    border-radius: 75%;
    font-size: 16px;
    border: none;
    cursor: pointer;
    background-color: transparent; /* Remove any background color */
}

.lightbox-close:hover {
    background-color: transparent; /* Remove any background color */
}

/* No requests message when empty */
.no-requests {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: #555;
    font-weight: bold;
    text-align: center;
    width: 100%;
    height: 100%;
    grid-column: 1 / -1; /* Make it span all columns */
}

/* When there are no requests, ensure the grid still shows the message */
#prayerWall:empty {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh; /* Adjust based on layout */
}

/* Center text on larger screens */
@media (min-width: 768px) {
    .no-requests {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 50vh; /* Center vertically */
        font-size: 2.5rem; /* Even larger text */
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-wrap: nowrap;  /* Prevent wrapping */
}

#paginationControls{
	display:inline;
}

.pagination-btn {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    white-space: nowrap;  /* Prevent text from wrapping */
    display: inline-block; /* Ensure inline display */
}

/* Previous/Next buttons (for « and ») */
.pagination-btn-prev,
.pagination-btn-next {
    font-weight: bold;
}

/* Pagination Number Buttons */
.pagination-btn-number {
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin: 0 5px;
}

.pagination-btn-number:hover {
    background-color: #f0f0f0;
}

.pagination-btn-number.active {
    background-color: #4CAF50;
    color: white;
}

/* Disabled Previous/Next buttons */
.pagination-btn-prev.disabled,
.pagination-btn-next.disabled {
    cursor: not-allowed;
    color: #bbb;
}

/* Mobile view for Pagination */
@media (max-width: 767px) {
    .pagination-btn {
        padding: 6px 10px;
    }
    .pagination-btn-number {
        font-size: 12px;
        padding: 6px 10px;
    }
}