/* Access Code Modal Styles */
.access-code-modal , .extension-modal, .payment-failure-modal{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(8px);
}

.access-code-container , .extension-container , .payment-failure-container{
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.extension-container{
  width: 100%;
}

.access-code-container::before , .extension-container::before , .payment-failure-container::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #4f46e5, #8b5cf6, #ec4899);
}

.access-code-header , .extension-header , .payment-failure-header{
  margin-bottom: 1.5rem;
}

.access-code-header h2 , .extension-header h2 , .payment-failure-header h2 {
  color: #1f2937;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.access-code-header p , .extension-header p , .payment-failure-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.access-code-input {
  margin-bottom: 1.5rem;
}

.access-code-input input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #f9fafb;
  color: #1f2937;
  text-align: center;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.access-code-input input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.access-code-button , .extension-button , .payment-failure-button {
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.extend-validity-button {
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.extend-validity-button:hover {
  background: linear-gradient(90deg, #4338ca, #7c3aed);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.access-code-button:hover , .extension-button:hover , .payment-failure-button:hover {
  background: linear-gradient(90deg, #4338ca, #7c3aed);
  transform: translateY(-2px);
}

.access-code-button:active , .extension-button:active , .payment-failure-button:active {
  transform: translateY(0);
}

.access-code-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.access-code-logo , .payment-failure-logo{
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.access-code-logo svg , .payment-failure-logo svg{
  width: 40px;
  height: 40px;
  color: #4f46e5;
}

/* Modal Close Button */
.modal-close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: all 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.modal-close-btn svg {
  width: 22px;
  height: 22px;
  color: #333;
}

.modal-close-btn:hover svg {
  color: #ef4444;
}

/* Mobile landscape adjustments for the close button */
@media (max-height: 500px) {
  .modal-close-btn {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }
  
  .modal-close-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .extension-modal#extensionModal .extension-container {
    padding-top: 2.5rem;
  }
}

/* Orientation Modal Styles */
.orientation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(8px);
}

.orientation-container {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.orientation-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #4f46e5, #8b5cf6, #ec4899);
}

.orientation-header {
  margin-bottom: 1.5rem;
}

.orientation-header h2 {
  color: #1f2937;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.orientation-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.orientation-album-preview {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.realistic-album {
  position: relative;
  display: flex;
  perspective: 1500px;
  transform-style: preserve-3d;
  margin-bottom: 1rem;
  transform: rotate(0deg) translateZ(0);
  width: 200px;
}

.album-spine {
  position: relative;
  width: 20px;
  height: 120px;
  background: linear-gradient(to right, #1a1a1a, #333333);
  transform-origin: right center;
  transform: rotateY(-25deg);
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.4);
  z-index: 1;
  border-radius: 3px 0 0 3px;
  overflow: hidden;
}

.spine-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, 
      rgba(255, 255, 255, 0.1) 0%, 
      rgba(255, 255, 255, 0.05) 20%, 
      rgba(255, 255, 255, 0) 40%, 
      rgba(255, 255, 255, 0.05) 60%, 
      rgba(255, 255, 255, 0.1) 80%, 
      rgba(255, 255, 255, 0.15) 100%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 15px,
      rgba(255, 255, 255, 0.05) 15px,
      rgba(255, 255, 255, 0.05) 16px
    );
}

.spine-texture::before {
  content: attr(data-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateZ(90deg);
  width: 100px;
  height: 16px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 8px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0px -1px 1px rgba(0,0,0,0.8);
}

.album-cover-container {
  width: 160px;
  height: 120px;
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  box-shadow: 
    5px 5px 15px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  background-size: cover;
  background-position: center;
  position: relative;
  transform-origin: left center;
  transform: rotateY(-8deg);
  z-index: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.3);
}

.album-cover-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: linear-gradient(to right, 
    rgba(0, 0, 0, 0.2), 
    rgba(0, 0, 0, 0.05) 50%, 
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.album-cover-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%),
    linear-gradient(to right, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 10%);
  pointer-events: none;
  z-index: 1;
}

.realistic-album::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(8px);
  border-radius: 50%;
  z-index: -1;
}

.album-info {
  text-align: center;
  margin-top: 0.5rem;
}

.album-info h6 {
  color: #1f2937;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.lab-name-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.lab-name-text span {
  font-weight: 500;
  color: #4b5563;
}

.orientation-button {
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orientation-button svg {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.orientation-button:hover {
  background: linear-gradient(90deg, #4338ca, #7c3aed);
  transform: translateY(-2px);
}

.orientation-button:active {
  transform: translateY(0);
}

.orientation-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.orientation-icon svg {
  width: 40px;
  height: 40px;
  color: #4f46e5;
}

/* eAlbum Branding in Orientation Modal */
.ealbum-branding {
  margin-top: 1.5rem;
  text-align: center;
}

.branding-divider {
  position: relative;
  height: 1px;
  background-color: rgba(203, 213, 225, 0.5);
  margin: 1.5rem 0;
}

.branding-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 0 1rem;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.branding-content {
  padding: 0 1rem;
}

.branding-logo {
  margin-bottom: 0.75rem;
}

.branding-logo img {
  height: 30px;
  max-width: 100%;
}

#ealbumTextLogo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: -0.025em;
}

.branding-tagline {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.branding-description {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.branding-description a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.branding-description a:hover {
  color: #6366f1;
  text-decoration: underline;
}

/* Essential Header Styles */
.ebook-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 5px 0 0;
}
@media screen and (orientation: portrait) {
  .ebook-header {
    z-index: 9999;
  }
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 15px;
}

.brand-section {
  display: flex;
  align-items: center;
  margin-left: 0;
  min-width: 200px;
}

.project-title-section {
  display: none;
  flex: 1;
  text-align: center;
}

.header-project-title {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 20px;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  margin-left: 10px;
}

.details-toggle, .share-to-app {
  background: none;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.3s;
  display: none;
}

.details-toggle:focus , .share-to-app:focus , .create-video-btn:focus {
  outline: none !important;
}

/* .details-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
} */

/* Create Video Button Animation */
/* @keyframes blink {
  0% { background-color: #ff5722; }
  50% { background-color: #ff9800; }
  100% { background-color: #ff5722; }
} */

.create-video-btn {
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 4px 12px;
  margin-right: 8px;
  font-weight: bold;
  display: none;
  align-items: center;
}

.create-video-btn i {
  margin-right: 5px;
  font-size: 18px;
}

/* Create Video Button Styles */
.create-video-bottom-btn {
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  display: none;
  align-items: center;
  position: fixed;
  bottom:7vh;
  left: 50%;
  transform: translateX(-50%) !important;
  z-index: 999;
}

.create-video-bottom-btn i {
  margin-right: 8px;
}

/* Media queries for create video buttons */
/* Desktop and landscape mobile: show top button, hide bottom button */
@media screen and (min-width: 768px), (orientation: landscape) {
  .create-video-bottom-btn {
    display: none;
  }
}
@media screen and (orientation: portrait) {
  .create-video-bottom-btn {
    z-index: 9999;
  }
}

/* Portrait mobile: hide top button, show bottom button */
@media screen and (max-width: 767px) and (orientation: portrait) {
  .create-video-btn {
    display: none;
  }
  .create-video-bottom-btn {
    display: none;
  }
}
/* 1. Pick your gradient colors — here’s a rich purple → pink neon vibe */
.create-video-btn,
.create-video-bottom-btn {
  background-image: linear-gradient(
    90deg,
    #4a90e2 0%,
    #4f46e5 50%,
    #8b5cf6 100%
  );
  background-size: 300% 100%;       /* make it wide so the “slide” is visible */
  border: none;
  color: #fff;
  /* keep all your existing padding, border-radius, position, etc. */
}

/* 2. Define the keyframes that move the gradient left→right→left */
@keyframes gradientSlide {
  0%   { background-position: 0%   0; }
  50%  { background-position: 100% 0; }
  100% { background-position: 0%   0; }
}

/* 3. Hook the animation onto both buttons, infinite loop */
.create-video-btn,
.create-video-bottom-btn {
  animation: gradientSlide 4s ease-in-out infinite;
}

.info-icon , .whatsapp-icon{
  font-style: normal;
  font-size: 2rem;
  color: white;
  display: inline-block;
  line-height: 1;
}

.brand-details-panel {
  position: fixed;
  top: 60px;
  right: -100%;
  z-index: 1001;
  width: 90%;
  max-width: 320px;
  transition: right 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  visibility: hidden;
}

.brand-details-panel.show {
  right: 20px;
  visibility: visible;
}

.brand-details-panel .card {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Adjust responsive breakpoints */
@media (max-width: 576px) {
  .brand-details-panel {
    top: 50px;
    width: calc(100% - 20px);
    max-width: none;
    right: -100%;
    max-height: 85vh;
  }

  .brand-details-panel.show {
    right: 10px;
  }

  .brand-details-panel .card-header {
    padding: 12px 16px;
  }

  .brand-details-panel .card-body {
    padding: 16px;
  }

  .detail-item {
    /* flex-direction: column; */
    align-items: flex-start;
    gap: 4px;
  }

  .detail-item span {
    text-align: left;
    width: 100%;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .brand-details-panel {
    top: 45px;
    max-height: 75vh;
  }
  
  .brand-details-panel .card {
    transform: scale(0.7);
    transform-origin: top right;
  }

  .access-code-container , .extension-container , .payment-failure-container{
    transform: scale(0.95);
  }
}

.brand-details-panel .card-header {
  background: #f8f9fa;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-details-panel .card-header h5 {
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.brand-details-panel .card-body {
  padding: 20px;
  background: #ffffff;
}

.detail-item {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item strong {
  color: #4a5568;
  font-size: 0.9rem;
  font-weight: 500;
  flex-shrink: 0;
}

.detail-item span {
  color: #1a202c;
  font-size: 0.95rem;
  text-align: right;
  word-break: break-word;
}

.expiry-date {
  font-size: 0.85rem;
  color: #718096;
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

/* Share Buttons Styles */
.share-section {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}

.share-title {
  color: #4a5568;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.share-button {
  background: none;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-button svg {
  width: 24px;
  height: 24px;
}

.share-button.whatsapp {
  background-color: #25D366;
  color: white;
}

.share-button.whatsapp:hover {
  background-color: #128C7E;
}

.share-button.email {
  background-color: #4A5568;
  color: white;
}

.share-button.email:hover {
  background-color: #2D3748;
}

/* Spread Controls Styles */
.spread-controls {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.spread-controls.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Popup Animation */
.collapse:not(.show) {
  display: none;
}

.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

.collapse.show {
  animation: popIn 0.2s ease-out;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Optimizations */
@media (max-width: 576px) {
  .brand-details-panel.show {
    right: 16px;
  }

  .brand-details-panel {
    width: calc(100% - 32px);
  }

  .brand-details-panel .card {
    margin-top: 8px;
  }

  .brand-details-panel .card-header {
    padding: 14px 16px;
  }

  .brand-details-panel .card-body {
    padding: 16px;
  }

  .detail-item {
    margin-bottom: 12px;
  }

  .detail-item strong {
    font-size: 0.85rem;
  }

  .detail-item span {
    font-size: 0.9rem;
  }
}

@media (min-width: 992px) {
  .project-title-section {
    display: block;
  }
  
  .header-content {
    justify-content: space-between;
  }
}

@media (max-width: 576px) {
  #branddetails {
    padding: 0.5rem;
  }
  
  #branddetails .card {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .access-code-container , .extension-container , .payment-failure-container{
    padding: 1.5rem;
  }

  .access-code-header h2 , .extension-header h2 , .payment-failure-header h2 {
    font-size: 1.25rem;
  }
}

/* Footer Toggle Button for Small Devices */
.footer-toggle {
  display: none;
  position: fixed;
  bottom: 5px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  z-index: 10001;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.footer-toggle:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.footer-toggle-icon {
  width: 20px;
  height: 20px;
  position: relative;
}

.footer-toggle-icon::before,
.footer-toggle-icon::after {
  content: '';
  position: absolute;
  background-color: white;
  transition: all 0.3s ease;
}

.footer-toggle-icon::before {
  width: 100%;
  height: 2px;
  top: 9px;
  left: 0;
}

.footer-toggle-icon::after {
  width: 2px;
  height: 100%;
  top: 0;
  left: 9px;
}

.footer-toggle.collapsed .footer-toggle-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-toggle {
    display: flex;
  }
  #fullscreen{
    display: inline-block;
  }
  
  .flipbook-footer1 {
    transform: translateY(100%);
    transition: transform 0.3s ease;
    background-color: rgba(0, 0, 0, 0.7);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    height:0px;
  }
  
  .flipbook-footer.visible {
    transform: translateY(0);
    height:auto;
  }
  
  .flipbook-viewport .container {
    bottom: 0;
    padding-bottom: 10px;
  }
}

/* Mobile Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    overflow: hidden;
  }
  
  .flipbook-viewport .container {
    transform-origin: center center;
  }
  
  .flipbook-viewport .container.scaled {
    transform: scale(0.85);
  }
  
  .ebook-header {
    padding: 5px 10px;
  }
  
  .brand-details-panel {
    max-height: 100vh;
  }
}

/* iOS Fullscreen Mode Styles */
body.ios-fullscreen {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.ios-fullscreen-view {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
  background-color: #000 !important;
}

.ios-fullscreen-hidden {
  display: none !important;
}

/* Make sure controls are visible in iOS fullscreen mode */
body.ios-fullscreen .flipbook-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  transform: none !important;
  opacity: 0.9;
}

/* Ensure the book is properly sized in iOS fullscreen */
body.ios-fullscreen .flipbook {
  margin: 0 auto !important;
}

/* Adjust fullscreen button appearance for iOS */
body.ios-fullscreen #fullscreen.moderestore {
  background-image: url('../img/restorefullscreen.png') !important;
}

/* Plan Selection Styles */
.plans-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0 0 0;
}

.plans-header {
  text-align: center;
  margin-bottom: 20px;
}

.plans-header h3 {
  color: #1f2937;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.plans-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.benefits-list li {
  padding: 5px 0;
  position: relative;
  padding-left: 25px;
  color: #4b5563;
}

.benefits-list li:before {
  content: "✓";
  color: #4CAF50;
  position: absolute;
  left: 0;
}

.featured-plans, .other-plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.other-plans h4 {
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  color: #4b5563;
}

.plan-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  width: 200px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: #fff;
  position: relative;
  cursor: pointer;
}

.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.plan-card.selected {
  border: 1px solid #4CAF50;
  background-color: rgba(76, 175, 80, 0.05);
}

.plan-tick-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plan-card.selected .plan-tick-mark {
  opacity: 1;
}

.plan-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.plan-card h4 {
  margin: 10px 0;
  color: #1f2937;
  font-weight: 600;
}

.plan-card p {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.plan-price {
  margin: 10px 0;
}

.current-price {
  font-size: 1.2em;
  font-weight: bold;
  color: #4CAF50;
}

.original-price {
  text-decoration: line-through;
  color: #999;
  margin-left: 5px;
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .featured-plans, .other-plans {
    flex-direction: column;
    align-items: center;
  }
  
  .plan-card {
    width: 100%;
    max-width: 280px;
  }
  
  .extension-modal#extensionModal .extension-container {
    max-width: 90%;
    padding: 1.5rem;
  }
}

/* Ensure the extension modal can accommodate the plans */
.extension-modal#extensionModal .extension-container {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  padding-top: 3rem;
  position: relative;
}

/* Desktop-specific styles for extension modal */
@media (min-width: 769px) {
  .extension-modal#extensionModal .extension-container {
    max-width: 900px;
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
  }
  
  .extension-modal#extensionModal .extension-header {
    margin-bottom: 0;
  }
  
  .extension-modal#extensionModal .featured-plans,
  .extension-modal#extensionModal .other-plans {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
  }
  
  .extension-modal#extensionModal .plan-card {
    width: 220px;
    padding: 20px;
    transition: all 0.3s ease;
  }
  
  .extension-modal#extensionModal .plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  
  .extension-modal#extensionModal .plan-icon {
    width: 70px;
    height: 70px;
  }
  
  .extension-modal#extensionModal .plans-header h3 {
    font-size: 1.8rem;
  }
  
  .extension-modal#extensionModal .plans-header p {
    font-size: 1rem;
    max-width: 80%;
    margin: 0 auto;
  }
  
  .extension-modal#extensionModal #proceedToPaymentButton {
    max-width: 300px;
    margin: 0 auto 0;
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
  }
  
  .extension-modal#extensionModal .benefits-list {
    max-width: 80%;
    margin: 10px auto;
    columns: 2;
  }
  
  .extension-modal#extensionModal .benefits-list li {
    /* margin-bottom: 10px; */
    break-inside: avoid;
  }
}

/* Additional mobile portrait adjustments */
@media (max-width: 480px) and (orientation: portrait) {
  .extension-modal#extensionModal .extension-container {
    max-width: 95%;
    padding: 1rem;
  }
  
  .plan-card {
    max-width: 240px;
    padding: 12px;
  }
  
  .plans-header h3 {
    font-size: 1.3rem;
  }
  
  .benefits-list {
    margin: 15px 0;
  }
  
  .benefits-list li {
    font-size: 0.9rem;
  }
}

/* Mobile landscape-specific styles for extension container */
@media (max-height: 600px) and (orientation: landscape) {
  .extension-container {
    width: calc(100vw);
    max-width: none;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 90vh;
    margin: 0 auto;
  }
   
  .plans-container {
    padding: 10px 0 0 0;
  }

  .plans-header p{
    white-space: normal;
  }
  
  /* Two-section layout for mobile landscape */
  .mobile-landscape-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 5px;
  }
  
  /* Left section (2/3) containing header and columns */
  .mobile-landscape-layout .left-section {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  
  /* Right section (1/3) containing form and button */
  .mobile-landscape-layout .right-section {
    flex: 1;
    min-width: 0;
    max-height: fit-content;
    display: flex;
    flex-direction: column;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
  }
  
  /* Header in left section */
  .mobile-landscape-layout .left-section .plans-header {
    margin-bottom: 10px;
  }
  
  /* Columns container for benefits and plans */
  .mobile-landscape-layout .columns-container {
    display: flex;
    gap: 10px;
  }
  
  /* First column: Benefits */
  .mobile-landscape-layout .benefits-column {
    flex: 1;
    min-width: 0;
    max-height: fit-content;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-landscape-layout .benefits-list {
    margin: 0;
    font-size: 0.9rem;
    text-align: left;
    padding: 10px;
  }
  .extension-modal#extensionModal .benefits-list{
    columns: 1;
    text-align: left;
  }
  
  .mobile-landscape-layout .benefits-list li {
    padding: 3px 0 3px 20px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    text-align: left;
    display: block;
    width: 100%;
  }
  
  /* Second column: Plan cards */
  .mobile-landscape-layout .plans-column {
    flex: 1;
    min-width: 0;
  }
  
  .mobile-landscape-layout .featured-plans {
    margin: 0;
    gap: 10px;
  }
  
  .mobile-landscape-layout .plan-card {
    width: 100%;
    padding: 10px;
  }
  
  .mobile-landscape-layout .plan-card h4 {
    font-size: 0.9rem;
    margin: 5px 0;
  }
  
  .mobile-landscape-layout .plan-card p {
    font-size: 0.8rem;
    margin-bottom: 5px;
  }
  
  .mobile-landscape-layout .plan-price {
    margin: 5px 0;
  }
  
  .mobile-landscape-layout .current-price {
    font-size: 1rem;
  }
  
  .mobile-landscape-layout .original-price {
    font-size: 0.8rem;
  }
  
  /* Form and button in right section */
  .mobile-landscape-layout .contact-form {
    margin: 0 0 8px;
    padding: 20px 10px;
  }
  
  .mobile-landscape-layout .contact-form h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  
  .mobile-landscape-layout .form-group {
    margin-bottom: 10px;
  }
  
  .mobile-landscape-layout .form-group input {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  .mobile-landscape-layout .form-group label {
    font-size: 0.85rem;
  }
  
  .mobile-landscape-layout .extension-button {
    margin-top: auto;
    padding: 10px;
    font-size: 0.9rem;
  }
  .extension-modal#extensionModal .featured-plans,
  .extension-modal#extensionModal .other-plans {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
    gap: 10px;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  }
}

/* Contact Form Styles */
.contact-form {
  margin: 20px 0;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  background-color: #f9fafb;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-form h4 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f2937;
  font-weight: 600;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.contact-form h4:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  border-radius: 3px;
}

.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background-color: white;
}

.form-group input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form-group input.error {
  border-color: #e53e3e;
  background-color: #fff5f5;
  padding-right: 40px;
}

.form-group input.error:focus {
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.error-message {
  color: #e53e3e;
  font-size: 13px;
  margin-top: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.error-message.visible {
  opacity: 1;
  max-height: 20px;
  margin-top: 6px;
}

.form-group.has-error .error-message {
  opacity: 1;
  max-height: 20px;
  margin-top: 6px;
}

.form-group.has-error::after {
  content: '!';
  position: absolute;
  right: 15px;
  top: 12px;
  color: white;
  background-color: #e53e3e;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.form-group label {
  position: absolute;
  left: 15px;
  top: 12px;
  color: #6b7280;
  font-size: 15px;
  transition: all 0.2s ease;
  pointer-events: none;
  background-color: transparent;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: 5px;
  left: 15px;
  font-size: 11px;
  color: #4f46e5;
  font-weight: 600;
}

.form-group input.error:focus + label,
.form-group input.error:not(:placeholder-shown) + label {
  color: #e53e3e;
}

.form-group input:focus,
.form-group input:not(:placeholder-shown) {
  padding-top: 18px;
  padding-bottom: 6px;
}

/* Responsive adjustments for contact form */
@media (max-width: 480px) and (orientation: portrait) {
  .contact-form {
    padding: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group input {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .error-message {
    font-size: 12px;
  }
  
  .contact-form h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
}