/* === CUSTOM STYLES === */
:root {
    --primary: #06b6d4; /* Bright Cyan/Teal Accent */
    --secondary: #f97316; /* Orange accent */
    --background: #f0f9ff; /* Very Light Blue background */
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    background-image: linear-gradient(to top right, #f0f9ff, #f7fbfc); 
}
.book-card {
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0f2f7; 
    cursor: pointer; 
}
.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.unavailable-card {
    background-color: #f3f4f6;
}
.unavailable-card:hover {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

/* Modal specific styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Default is hidden, waiting for JS to toggle */
    justify-content: center;
    align-items: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}

.status-badge {
    font-size: 0.7rem;
    line-height: 1rem; 
}

.form-modal {
    width: 100%;
    max-width: 450px; 
}
.dashboard-modal, .profile-modal {
    width: 100%;
    max-width: 640px; 
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: #ef4444; /* red-500 */
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.chat-modal {
    width: 100%;
    max-width: 400px; 
}
#chat-messages-container {
    height: 400px;
}
.message-bubble {
    max-width: 75%;
    word-wrap: break-word;
}
.message-sent {
    background-color: #06b6d4; /* cyan-500 */
    color: white;
    align-self: flex-end;
}
.message-received {
    background-color: #e5e7eb; /* gray-200 */
    color: #1f2937; /* gray-800 */
    align-self: flex-start;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse; 
}
.star-rating input[type="radio"] {
    display: none;
}
.star-rating label {
    font-size: 2rem;
    color: #d1d5db; /* gray-300 */
    cursor: pointer;
    transition: color 0.2s;
}
.star-rating:not(.disabled) label:hover,
.star-rating:not(.disabled) label:hover ~ label {
    color: #f59e0b; /* amber-500 */
}
.star-rating input[type="radio"]:checked ~ label {
    color: #f59e0b; /* amber-500 */
}

/* Profile Stat Card */
.stat-card {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}
.stat-card-title {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* medium */
    color: #4b5563; /* gray-600 */
}
.stat-card-value {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* bold */
    color: #06b6d4; /* cyan-600 */
    margin-top: 0.25rem;
    line-height: 2rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background-color 0.15s;
    margin-bottom: 1rem;
}
.google-btn:hover {
    background-color: #f9fafb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}