/* Loader full screen background */
#loader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #f9f9f9;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Book animation */
.book-loader {
  width: 60px;
  height: 50px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.book-loader .page {
  width: 15px;
  height: 40px;
  background: #6c63ff;
  margin: 0 2px;
  border-radius: 2px;
  animation: flip 1s infinite ease-in-out;
}

.book-loader .page:nth-child(1) { animation-delay: 0s; }
.book-loader .page:nth-child(2) { animation-delay: 0.2s; }
.book-loader .page:nth-child(3) { animation-delay: 0.4s; }

@keyframes flip {
  0%   { transform: scaleY(1); }
  50%  { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

#loader p {
  margin-top: 15px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: #444;
}

/* Modal visibility toggle (keep your existing styles) */
.tt-upload-video-modal { display: none; }
.tt-upload-video-modal.is-open { display: block; }

/* Edit book modal visibility toggle */
.tt-edit-book-modal { display: none; }
.tt-edit-book-modal.is-open { display: block; }

/* Edit book modal styles - matching upload modal */
.tt-edit-book-modal {
  width: clamp(300px, 57.8vw, 1100px);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 100;
  background-color: var(--black);
  border-radius: 30px;
  box-shadow: 0px 4px 64px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.tt-edit-book-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.tt-edit-book-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding: clamp(15px, 1.05vw, 20px) clamp(20px, 2.1vw, 40px);
}

.tt-edit-book-modal-header .title {
  font-size: clamp(17px, 1.05vw, 20px);
  font-weight: 600;
  color: #000;
}

.tt-edit-book-modal-close {
  width: 32px;
  aspect-ratio: 1/1;
  background-color: rgba(255, 0, 0, 0.1019607843);
  color: var(--ttRed);
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

.tt-edit-book-modal-close i {
  display: inline-flex;
}

.tt-edit-book-modal-close:hover {
  background-color: var(--ttRed);
  color: var(--white);
}

.tt-edit-book-modal-body {
  padding: 0 clamp(20px, 2.1vw, 40px);
  text-align: center;
}

.tt-edit-book-modal-footer {
  margin-bottom: 0;
  font-size: clamp(13px, 0.84vw, 16px);
  color: var(--ttGray2);
  text-align: center;
  padding: clamp(15px, 1.58vw, 30px) clamp(20px, 3.15vw, 60px);
}

@media screen and (max-width: 767px) {
  .tt-edit-book-modal {
    width: 90%;
  }
}

/* Optional body lock */
.overflow-hidden { overflow: hidden; }


.profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Wrapper to align button & filename */
.file-upload-label {
    display: flex;
    align-items: center;
    background: #292929;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #444;
    width: 100%;
}

/* Button part */
.file-btn {
    background: #444;
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

/* Filename part */
.file-name {
    margin-left: 10px;
    color: #aaa;
    font-size: 14px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hide native file input */
.file-upload-input {
    display: none;
}

/* Filename part */
.file-name {
    margin-left: 10px;
    color: #aaa;
    font-size: 14px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Custom CSS for The Bookish Club */
.tt-footer-brand {
    display: flex;
    align-items: center;
}

.tt-footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tt-footer-logo:hover {
    transform: translateY(-2px);
}

.tt-footer-logo img {
    height: 70px;
    width: 70px;
    transition: all 0.3s ease;
}

.tt-footer-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #FF9046;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.tt-footer-logo:hover .tt-footer-logo-text {
    color: #fff;
}

/* Responsive Footer Logo */
@media (max-width: 991.98px) {
    .tt-footer-brand {
        justify-content: center;
        margin-bottom: 20px;
    }

    .tt-footer-logo img {
        height: 60px;
        width: 60px;
    }

    .tt-footer-logo-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 767.98px) {
    .tt-footer-logo {
        gap: 10px;
    }

    .tt-footer-logo img {
        height: 50px;
        width: 50px;
    }

    .tt-footer-logo-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tt-footer-logo {
        gap: 8px;
    }

    .tt-footer-logo img {
        height: 40px;
        width: 40px;
    }

    .tt-footer-logo-text {
        font-size: 1.1rem;
    }
}

/* Sidebar Brand and Logo */
.tt-sidebar-brand {
    display: flex;
    align-items: center;
}

.tt-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tt-sidebar-logo:hover {
    transform: translateY(-1px);
}

.tt-sidebar-logo img {
    height: 60px;
    width: 60px;
    transition: all 0.3s ease;
}

.tt-sidebar-logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.tt-sidebar-logo:hover .tt-sidebar-logo-text {
    color: white;
}

/* Responsive Sidebar Logo */
@media (max-width: 1199.98px) {
    .tt-sidebar-logo {
        gap: 8px;
    }

    .tt-sidebar-logo img {
        height: 40px;
        width: 40px;
    }

    .tt-sidebar-logo-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 991.98px) {
    .tt-sidebar-brand {
        justify-content: center;
    }

    .tt-sidebar-logo img {
        height: 35px;
        width: 35px;
    }

    .tt-sidebar-logo-text {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .tt-sidebar-logo {
        gap: 6px;
    }

    .tt-sidebar-logo img {
        height: 30px;
        width: 30px;
    }

    .tt-sidebar-logo-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tt-sidebar-logo {
        gap: 5px;
    }

    .tt-sidebar-logo img {
        height: 45px;
        width: 45px;
    }

    .tt-sidebar-logo-text {
        font-size: 0.8rem;
    }
}

/* Upload Button Styles */
.ul-btn {
    background-color: var(--ttRed);
    color: var(--white);
    padding: 10px 30px;
    border-radius: 30px;
}

.ul-btn:hover {
    background-color: #292929;
}


/* Contact Section Styles */
.tt-contact-section {
    background: #181a1b;
    padding-top: 40px;
    padding-bottom: 40px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Improved Contact Section Container and Font Size */
.tt-contact-section .container {
    display: block;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
}

.tt-contact-box {
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    width: 100%;
    background: #23272b;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 1.08rem;
}

.tt-contact-box h2 {
    color: #FF9046;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2rem;
}

.tt-contact-box .form-label {
    color: #FF9046;
    font-weight: 500;
    margin-bottom: 6px;
}

.tt-contact-box .form-control,
.tt-contact-box .form-select {
    background: #181a1b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.tt-contact-box .form-control:focus,
.tt-contact-box .form-select:focus {
    border-color: #FF9046;
    box-shadow: none;
    background: #181a1b;
    color: #fff;
}

.tt-contact-box textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.tt-contact-box .ul-btn {
    background: #FF9046;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.tt-contact-box .ul-btn:hover {
    background: #ff7a1a;
    color: #fff;
}

.tt-contact-info h5 {
    color: #FF9046;
    font-weight: 600;
}

.tt-contact-info a {
    color: #FF9046;
    text-decoration: underline;
    word-break: break-all;
}

.tt-contact-info {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991.98px) {
    .tt-contact-section .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .tt-contact-box h2 {
        font-size: 1.5rem;
    }

    .tt-contact-box {
        max-width: 100%;
    }

    .tt-contact-section {
        min-height: unset;
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

@media (max-width: 767.98px) {
    .tt-contact-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .tt-contact-section .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .tt-contact-box {
        font-size: 1rem;
    }

    .tt-contact-box h2 {
        font-size: 1.5rem;
    }

    .tt-contact-info {
        font-size: 0.98rem;
    }
}

@media (max-width: 480px) {
    .tt-contact-box {
        padding: 1rem 0.3rem;
    }

    .tt-contact-box h2 {
        font-size: 1.2rem;
    }

    .tt-contact-info {
        font-size: 0.92rem;
    }
}

/* Multi-Select Dropdown Styles */
.tt-multi-select-container {
    position: relative;
    width: 100%;
    font-family: var(--font-inter);
}

.tt-multi-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    padding: clamp(12.5px, 1.29vw, 24.5px) clamp(18px, 1.58vw, 30px);
    background-color: transparent;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 48px;
}

.tt-multi-select-display:hover {
    border-color: var(--ttRed);
}

.tt-multi-select-display.active {
    border-color: var(--ttRed);
    box-shadow: 0 0 0 2px rgba(0, 72, 255, 0.1);
}

.tt-multi-select-placeholder {
    color: var(--black);
    font-size: 1rem;
    opacity: 0.7;
}

.tt-multi-select-display i {
    color: var(--ttGray2);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.tt-multi-select-display.active i {
    transform: rotate(180deg);
}

.tt-multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    display: none;
    margin-top: 4px;
}

.tt-multi-select-dropdown.show {
    display: block;
}

.tt-multi-select-search {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.tt-multi-select-search input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.tt-multi-select-search input:focus {
    border-color: var(--ttRed);
}

.tt-multi-select-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
}

.tt-multi-select-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.tt-multi-select-option:hover {
    background-color: #f8f9fa;
}

.tt-multi-select-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tt-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #D9D9D9;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tt-multi-select-option input[type="checkbox"]:checked+.tt-checkbox-custom {
    background-color: var(--ttRed);
    border-color: var(--ttRed);
}

.tt-multi-select-option input[type="checkbox"]:checked+.tt-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tt-option-text {
    font-size: 14px;
    color: var(--black);
    flex: 1;
}

/* Selected items display */
.tt-multi-select-display .selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.tt-selected-tag {
    background-color: var(--ttRed);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tt-selected-tag .remove-tag {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tt-selected-tag .remove-tag:hover {
    opacity: 1;
}

/* Dark mode support */
.dark-mode .tt-multi-select-display {
    background-color: #222222;
    border-color: #444;
}

.dark-mode .tt-multi-select-placeholder {
    color: #fff;
}

.dark-mode .tt-multi-select-dropdown {
    background: #222222;
    border-color: #444;
}

.dark-mode .tt-multi-select-search input {
    background: #333;
    border-color: #555;
    color: #fff;
}

.dark-mode .tt-multi-select-option:hover {
    background-color: #333;
}

.dark-mode .tt-option-text {
    color: #fff;
}

.dark-mode .tt-checkbox-custom {
    border-color: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tt-multi-select-dropdown {
        max-height: 250px;
    }

    .tt-multi-select-options {
        max-height: 150px;
    }

    .tt-multi-select-option {
        padding: 12px 16px;
    }

    .tt-option-text {
        font-size: 16px;
    }
}

/* Scrollbar styling for dropdown */
.tt-multi-select-options::-webkit-scrollbar {
    width: 6px;
}

.tt-multi-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tt-multi-select-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tt-multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark-mode .tt-multi-select-options::-webkit-scrollbar-track {
    background: #333;
}

.dark-mode .tt-multi-select-options::-webkit-scrollbar-thumb {
    background: #555;
}

.dark-mode .tt-multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Single-Select Dropdown Styles */
.tt-single-select-container {
    position: relative;
    width: 100%;
    font-family: var(--font-inter);
}

.tt-single-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    padding: clamp(12.5px, 1.29vw, 24.5px) clamp(18px, 1.58vw, 30px);
    background-color: transparent;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 48px;
}

.tt-single-select-display:hover {
    border-color: var(--ttRed);
}

.tt-single-select-display.active {
    border-color: var(--ttRed);
    box-shadow: 0 0 0 2px rgba(0, 72, 255, 0.1);
}

.tt-single-select-placeholder {
    color: var(--black);
    font-size: 1rem;
    opacity: 0.7;
}

.tt-single-select-display i {
    color: var(--ttGray2);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.tt-single-select-display.active i {
    transform: rotate(180deg);
}

.tt-single-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    display: none;
    margin-top: 4px;
}

.tt-single-select-dropdown.show {
    display: block;
}

.tt-single-select-search {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.tt-single-select-search input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.tt-single-select-search input:focus {
    border-color: var(--ttRed);
}

.tt-single-select-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px 0;
}

.tt-single-select-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.tt-single-select-option:hover {
    background-color: #f8f9fa;
}

.tt-single-select-option.selected {
    background-color: var(--ttRed);
    color: white;
}

.tt-single-select-option.selected .tt-option-text {
    color: white;
}

.tt-single-select-option .tt-option-text {
    font-size: 14px;
    color: var(--black);
    flex: 1;
}

/* Selected value display */
.tt-single-select-display .selected-value {
    color: var(--black);
    font-size: 1rem;
    font-weight: 500;
}

/* Dark mode support for single select */
.dark-mode .tt-single-select-display {
    background-color: #222222;
    border-color: #444;
}

.dark-mode .tt-single-select-placeholder {
    color: #fff;
}

.dark-mode .tt-single-select-dropdown {
    background: #222222;
    border-color: #444;
}

.dark-mode .tt-single-select-search input {
    background: #333;
    border-color: #555;
    color: #fff;
}

.dark-mode .tt-single-select-option:hover {
    background-color: #333;
}

.dark-mode .tt-single-select-option.selected {
    background-color: var(--ttRed);
}

.dark-mode .tt-single-select-option .tt-option-text {
    color: #fff;
}

.dark-mode .tt-single-select-option.selected .tt-option-text {
    color: white;
}

.dark-mode .tt-single-select-display .selected-value {
    color: #fff;
}

/* Responsive adjustments for single select */
@media (max-width: 768px) {
    .tt-single-select-dropdown {
        max-height: 250px;
    }

    .tt-single-select-options {
        max-height: 150px;
    }

    .tt-single-select-option {
        padding: 12px 16px;
    }

    .tt-single-select-option .tt-option-text {
        font-size: 16px;
    }
}

/* Scrollbar styling for single select dropdown */
.tt-single-select-options::-webkit-scrollbar {
    width: 6px;
}

.tt-single-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tt-single-select-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tt-single-select-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dark-mode .tt-single-select-options::-webkit-scrollbar-track {
    background: #333;
}

.dark-mode .tt-single-select-options::-webkit-scrollbar-thumb {
background: #555;
}

.dark-mode .tt-single-select-options::-webkit-scrollbar-thumb:hover {
background: #666;
}

/* CKEditor styling for Blurb field */
.ck-editor {
width: 100% !important;
}

.ck.ck-editor__main > .ck-editor__editable {
min-height: 180px;
border-radius: 10px !important;
}

/* Light mode */
.light-mode .ck.ck-toolbar {
background: #fff;
border-color: #D9D9D9;
}
.light-mode .ck.ck-toolbar .ck-button .ck-icon,
.light-mode .ck.ck-toolbar .ck-toolbar__separator {
color: #333;
}
.light-mode .ck.ck-editor__main > .ck-editor__editable {
background: #fff;
color: #111;
border-color: #D9D9D9;
}

/* Dark mode */
.dark-mode .ck.ck-toolbar {
background: #222222;
border-color: #444;
}
.dark-mode .ck.ck-toolbar .ck-button .ck-icon,
.dark-mode .ck.ck-toolbar .ck-toolbar__separator {
color: #eee;
}
.dark-mode .ck.ck-editor__main > .ck-editor__editable {
background: #1b1b1b;
color: #fff;
border-color: #444;
}

/* Make editor comfortable inside modals */
.tt-upload-video-modal .ck-editor,
.tt-edit-book-modal .ck-editor {
margin-top: 6px;
}

/* Responsive editor height */
@media (max-width: 767.98px) {
.ck.ck-editor__main > .ck-editor__editable {
min-height: 140px;
}
}

@media (min-width: 1200px) {
.ck.ck-editor__main > .ck-editor__editable {
min-height: 220px;
}
}

/* Rendered blurb content styling */
.blurb-content {
  line-height: 1.7;
  font-size: 1rem;
  color: inherit;
}
.blurb-content p {
  margin: 0 0 0.75rem 0;
}
.blurb-content h1,
.blurb-content h2,
.blurb-content h3,
.blurb-content h4,
.blurb-content h5,
.blurb-content h6 {
  margin: 1rem 0 0.5rem 0;
  line-height: 1.3;
}
.blurb-content ul,
.blurb-content ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.blurb-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.blurb-content a {
  color: #0048FF;
  text-decoration: underline;
}
.dark-mode .blurb-content a {
  color: #0f0f0f;
}

/* Grid card description spacing */
.book-description {
  color: inherit;
  margin-top: 8px;
}