/* Court Grid */
.pcbp-court-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.pcbp-court-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.pcbp-court-card:hover {
    transform: translateY(-5px);
}

.pcbp-court-image {
    height: 200px;
    overflow: hidden;
}

.pcbp-court-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcbp-court-info {
    padding: 20px;
}

.pcbp-court-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.pcbp-court-price {
    font-size: 1.5rem;
    color: #4CAF50;
    font-weight: bold;
    margin: 10px 0;
}

.pcbp-court-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.pcbp-amenity-tag {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.pcbp-btn-book {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.pcbp-btn-book:hover {
    background: #45a049;
    color: white;
}

/* Calendar */
.pcbp-calendar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 30px 0;
}

.pcbp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pcbp-calendar-month {
    font-size: 1.5rem;
    font-weight: bold;
}

.pcbp-calendar-nav {
    display: flex;
    gap: 10px;
}

.pcbp-calendar-nav button {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pcbp-calendar-nav button:hover {
    background: #e0e0e0;
}

.pcbp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.pcbp-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.pcbp-calendar-day {
    aspect-ratio: 1;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
}

.pcbp-calendar-day:hover {
    background: #f0f0f0;
}

.pcbp-calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #2196F3;
}

.pcbp-calendar-day.has-bookings {
    background: #fff3e0;
}

.pcbp-calendar-day.available {
    background: #e8f5e8;
}

.pcbp-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.pcbp-booking-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff9800;
}

/* Booking Form */
.pcbp-booking-form {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
}

.pcbp-form-group {
    margin-bottom: 20px;
}

.pcbp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.pcbp-form-group input[type="text"],
.pcbp-form-group input[type="email"],
.pcbp-form-group input[type="tel"],
.pcbp-form-group select,
.pcbp-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.pcbp-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pcbp-time-slot {
    padding: 10px;
    text-align: center;
    background: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcbp-time-slot:hover {
    background: #e0e0e0;
}

.pcbp-time-slot.selected {
    background: #4CAF50;
    color: white;
}

.pcbp-time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pcbp-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.pcbp-payment-method {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcbp-payment-method:hover {
    border-color: #4CAF50;
}

.pcbp-payment-method.selected {
    border-color: #4CAF50;
    background: #f0f9f0;
}

.pcbp-payment-method img {
    max-width: 100px;
    margin-bottom: 10px;
}

/* My Bookings */
.pcbp-my-bookings {
    max-width: 800px;
    margin: 30px auto;
}

.pcbp-booking-list {
    list-style: none;
    padding: 0;
}

.pcbp-booking-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.pcbp-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pcbp-booking-number {
    font-weight: bold;
    color: #666;
}

.pcbp-booking-status {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
}

.pcbp-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.pcbp-status-pending {
    background: #fff3cd;
    color: #856404;
}

.pcbp-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.pcbp-booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.pcbp-booking-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pcbp-btn-cancel {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pcbp-btn-cancel:hover {
    background: #c82333;
}

/* Reviews */
.pcbp-reviews-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.pcbp-average-rating {
    text-align: center;
}

.pcbp-rating-number {
    font-size: 3rem;
    font-weight: bold;
    color: #ff9800;
}

.pcbp-rating-stars {
    color: #ff9800;
    font-size: 1.2rem;
}

.pcbp-rating-count {
    color: #666;
}

.pcbp-review-form {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pcbp-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.pcbp-star-rating input {
    display: none;
}

.pcbp-star-rating label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
}

.pcbp-star-rating label:hover,
.pcbp-star-rating label:hover ~ label,
.pcbp-star-rating input:checked ~ label {
    color: #ff9800;
}

.pcbp-review-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pcbp-review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.pcbp-reviewer-name {
    font-weight: bold;
}

.pcbp-review-date {
    color: #666;
    font-size: 0.9rem;
}

/* QR Check-in */
.pcbp-qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.pcbp-qr-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
}

.pcbp-qr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pcbp-court-grid {
        grid-template-columns: 1fr;
    }
    
    .pcbp-calendar-days {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.9rem;
    }
    
    .pcbp-payment-methods {
        grid-template-columns: 1fr;
    }
    
    .pcbp-booking-details {
        grid-template-columns: 1fr;
    }
    
    .pcbp-reviews-summary {
        flex-direction: column;
        gap: 15px;
    }
}

/* Loading Spinner */
.pcbp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: pcbp-spin 1s ease-in-out infinite;
}

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

/* Notifications */
.pcbp-notification {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    display: none;
}

.pcbp-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pcbp-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pcbp-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ================================
   Dashboard
================================ */

.pcbp-dashboard-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

.pcbp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* Dashboard Card */

.pcbp-dashboard-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.pcbp-dashboard-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcbp-dashboard-title i {
    color: #4CAF50;
}

/* Dashboard rows */

.pcbp-dashboard-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pcbp-dashboard-row {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #eee;
}

.pcbp-row-main {
    font-weight: 600;
    margin-bottom: 5px;
}

.pcbp-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

/* Status badges */

.pcbp-status-badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Dashboard Empty State */

.pcbp-empty-state {
    text-align: center;
    padding: 30px 15px;
}

.pcbp-empty-icon {
    font-size: 36px;
    color: #ccc;
    margin-bottom: 10px;
}

.pcbp-empty-state p {
    color: #777;
}

/* Dashboard Mobile */

@media (max-width: 768px) {

    .pcbp-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .pcbp-row-meta {
        flex-direction: column;
        gap: 5px;
    }

    .pcbp-dashboard-card {
        padding: 15px;
    }

    .pcbp-dashboard-title {
        font-size: 1.1rem;
    }

}

/* Dashboard Stats */

.pcbp-dashboard-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:25px;
}

.pcbp-stat-card{
    background:#fff;
    padding:20px;
    border-radius:10px;
    text-align:center;
    box-shadow:0 3px 12px rgba(0,0,0,0.1);
}

.pcbp-stat-card i{
    font-size:22px;
    color:#4CAF50;
}

.pcbp-stat-number{
    font-size:26px;
    font-weight:bold;
    display:block;
    margin:5px 0;
}

.pcbp-stat-label{
    font-size:13px;
    color:#666;
}

/* Dashboard Stats Responsive */

@media (max-width:768px){

    .pcbp-dashboard-stats{
        grid-template-columns:1fr;
    }

}