/* Magazine Flipbook Styles */

/* Full-Screen Modal */
.flipbook-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.flipbook-modal.hidden {
  display: none;
}

.flipbook-modal-content {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0.5rem;
}

.flipbook-viewer-container {
  position: relative;
  background: #2d3748;
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
  min-height: 600px;
}

.magazine-flipbook-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  margin-bottom: 0.25rem;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.magazine-flipbook {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  margin: 0 auto;
  transition: transform 0.3s ease;
  will-change: transform;
}

.magazine-page {
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.magazine-page canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Flipbook Controls */
.flipbook-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.flipbook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 0.5rem;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flipbook-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.flipbook-btn:active {
  transform: translateY(0);
}

.flipbook-btn svg {
  width: 20px;
  height: 20px;
}

.flipbook-page-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  font-weight: 600;
  color: #2d3748;
  min-width: 80px;
  justify-content: center;
}

.flipbook-separator {
  color: #cbd5e0;
}

/* Loading State */
.flipbook-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: white;
}

.flipbook-loading .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #C5484D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.flipbook-loading p {
  font-size: 1.125rem;
  font-weight: 500;
}

/* Error State */
.flipbook-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: white;
  text-align: center;
  padding: 2rem;
}

.flipbook-error svg {
  color: #f56565;
  margin-bottom: 1rem;
}

.flipbook-error p {
  font-size: 1.125rem;
  max-width: 400px;
}

/* Fullscreen Styles */
.flipbook-viewer-container:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: #1a202c;
}

.flipbook-viewer-container:fullscreen .magazine-flipbook {
  max-width: 90vw;
  max-height: 80vh;
}

/* Full-Screen Modal Content Area */
.flipbook-modal #flipbook-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 0;
  margin-bottom: 0.25rem;
}

.flipbook-modal .magazine-flipbook-wrapper {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.flipbook-modal .magazine-flipbook {
  max-width: 98vw !important;
  max-height: calc(100vh - 100px) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .flipbook-modal {
    padding: 0;
  }

  .flipbook-modal-content {
    padding: 0.25rem;
  }

  .flipbook-viewer-header {
    padding: 0.375rem 0.5rem;
    margin-bottom: 0.25rem;
  }

  .flipbook-viewer-title {
    font-size: 0.875rem;
  }

  .flipbook-close-btn {
    width: 32px;
    height: 32px;
  }

  .flipbook-close-btn svg {
    width: 18px;
    height: 18px;
  }

  .flipbook-viewer-container {
    padding: 0.25rem;
  }

  .magazine-flipbook {
    max-width: 100%;
  }

  .flipbook-modal .magazine-flipbook {
    max-width: 99vw !important;
    max-height: calc(100vh - 80px) !important;
  }

  .flipbook-modal #flipbook-container {
    margin-bottom: 0.25rem;
  }

  .flipbook-controls {
    gap: 0.5rem;
    padding: 0.375rem;
    flex-wrap: nowrap;
  }

  .flipbook-btn {
    width: 32px;
    height: 32px;
  }

  .flipbook-btn svg {
    width: 16px;
    height: 16px;
  }

  .flipbook-page-info {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 60px;
  }
}

/* Large screens - bigger flipbook */
@media (min-width: 1920px) {
  .flipbook-modal .magazine-flipbook {
    max-width: 1800px !important;
    max-height: calc(100vh - 100px) !important;
  }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .flipbook-modal .magazine-flipbook {
    max-width: 96vw !important;
    max-height: calc(100vh - 100px) !important;
  }
}

/* Turn.js Page Shadows */
.magazine-flipbook .even {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 10%);
}

.magazine-flipbook .odd {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 10%);
}

/* Turn.js Hard Pages (Cover) */
.magazine-flipbook .hard {
  background: #f5f5f5;
  border: 1px solid #ddd;
}

/* Flip Animation Enhancement */
.magazine-flipbook .page-wrapper {
  perspective: 2000px;
}

/* Viewer Header */
.flipbook-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.flipbook-viewer-title {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
}

.flipbook-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.flipbook-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.flipbook-close-btn svg {
  width: 24px;
  height: 24px;
}

/* Page Turn Cursor */
.magazine-flipbook .page {
  cursor: pointer;
}

.magazine-flipbook .page:hover {
  cursor: grab;
}

.magazine-flipbook .page:active {
  cursor: grabbing;
}
/* Newsletter popup animations */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#newsletter-popup {
  animation: fadeIn 0.3s ease-in-out;
}

#newsletter-popup > div {
  animation: slideUp 0.3s ease-in-out;
}

.animate-slideUp {
  animation: slideUp 0.3s ease-in-out;
}
/* line 3, app/assets/stylesheets/theme.scss */
html {
  scroll-behavior: smooth;
}
/* line 14, app/assets/stylesheets/trestle/_custom.scss */
.theme-bg {
  background-color: white !important;
  background-image: none;
}

/* line 19, app/assets/stylesheets/trestle/_custom.scss */
.btn-primary {
  background-color: #b3362e;
  border-color: #b3362e;
}

/* line 23, app/assets/stylesheets/trestle/_custom.scss */
.btn-primary:hover {
  background-color: #9f3029;
  border-color: #9f3029;
}

/* line 31, app/assets/stylesheets/trestle/_custom.scss */
.login-form .form-group .input-group {
  border: 1px solid #e3e3e3;
  border-radius: 15px;
}

/* line 35, app/assets/stylesheets/trestle/_custom.scss */
.login-form .form-group .input-group .input-group-text {
  color: #b3362e;
}

/* line 39, app/assets/stylesheets/trestle/_custom.scss */
.login-form .form-group .input-group input {
  -webkit-text-fill-color: black;
  color: black !important;
}

/* line 44, app/assets/stylesheets/trestle/_custom.scss */
.login-form .form-group .form-check-label {
  color: #000000 !important;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
