/* =============================================================================
   Typography
   ============================================================================= */
body, textarea, .select:before, input, select, button, .btn {
  font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', 'Nimbus Sans', 'Segoe UI', 'sans-serif' !important;
}

header {
  background: #1D1D1B;
}

/* Hide the top right GoTyme Bank logo for iKhokha */
.gotyme-bank {
  display: none !important;
}

body {
  background: #fff;
}

/* =============================================================================
   Slider Fill Colour
   ============================================================================= */
.rangeslider__fill {
  background: linear-gradient(to right, #009EAC);
}

/* =============================================================================
   Slider Styling - Cross-browser consistency
   ============================================================================= */
.rangeslider__handle {
  background: #009EAC !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.25) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.rangeslider__handle:after {
  display: none !important; 
}

.rangeslider--horizontal {
  height: 10px !important;
  border-radius: 15px !important;
}

.rangeslider__fill {
  background: #009EAC !important; 
  border-radius: 15px !important;
}

/* Fix Chrome/Safari specific issues */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  background: #009EAC !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
}

/* Fix Firefox specific issues */
input[type=range]::-moz-range-thumb {
  background: #009EAC !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  border: none !important;
}

/* =============================================================================
   Carousel Styling
   ============================================================================= */
.ikhokha-carousel-container {
  max-width: 600px;
  width: 100%;
  box-sizing: border-box; 
  overflow: visible; 
  margin: 16px auto 0;
  position: relative;
  border-radius: 12px;
  min-height: 112px; /* Base height for collapsed slides (80px + 32px padding) */
}
.ikhokha-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 80px;
  overflow: hidden;
  padding: 16px 16px 32px;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.6s ease-in-out, max-height 0.5s ease;
  pointer-events: none;
  box-sizing: border-box;
}
.ikhokha-carousel-slide.active {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}
.ikhokha-carousel-slide.expanded {
  max-height: none !important;
  z-index: 9999 !important;
  position: relative;
}

/* =============================================================================
   Carousel arrow styling (down and up arrows)
   ============================================================================= */
/* Down arrow - shown on active, non-expanded cards */
.ikhokha-carousel-slide.active::after {
  content: "";  
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background-image: url('/static/images/arrow.png');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Hide down arrow when expanded */
.ikhokha-carousel-slide.expanded::after {
  display: none;
}

/* Up arrow - only shown when card is expanded */
.ikhokha-carousel-slide.expanded::before {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg); /* Rotate the arrow to point up */
  width: 24px;
  height: 24px;
  background-image: url('/static/images/arrow.png');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  display: block; /* Ensure it's visible */
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* =============================================================================
   Carousel Progress Indicators
   ============================================================================= */
.carousel-progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 20px;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.carousel-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(35, 35, 35, 0.3);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-progress-dot.active {
  background-color: #1D1D1B;
  transform: scale(1.2);
}

/* =============================================================================
   Carousel Content Styling
   ============================================================================= */
.ikhokha-carousel-content {
  border-radius: 14px;
  padding: 0 6px;
} 

/* =============================================================================
   Mobile carousel
   ============================================================================= */

@media (max-width: 600px) {
  .ikhokha-carousel-container {
    overflow: hidden !important;
    position: relative;
  }
  .ikhokha-carousel-slide {
    display: none !important;
  }
  .ikhokha-carousel-slide.active {
    display: block !important;
    width: 100% !important;
    max-height: 100px !important;
  }
  .ikhokha-carousel-slide.expanded {
    max-height: none !important;
  }
  .ikhokha-carousel-nav {
    display: block !important;
  }
  .ikhokha-carousel-content h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  .ikhokha-carousel-slide:not(.expanded) .ikhokha-carousel-content > *:not(h2) {
    display: none;
  }
}

/* =============================================================================
   Colours
   ============================================================================= */ 
.ik-bg-red { background: #D72A4E; color: #1D1D1B; }
.ik-bg-yellow { background: #D64C19; color: #1D1D1B; }
.ik-bg-teal { background: #009EAC; color: #1D1D1B; }

.ikhokha-carousel-content h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -1px;
}
.ikhokha-carousel-content p,
.ikhokha-carousel-content ul,
.ikhokha-carousel-content strong { font-size: 1.25rem; }
.ikhokha-carousel-content ul { list-style: none; padding: 0; margin: 0; }
.ikhokha-carousel-content li {
  margin-bottom: 8px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
}
.ikhokha-carousel-content li::before {
  content: '✔';
  color: #1D1D1B;
  margin-right: 10px;
  font-size: 1.2em;
}
.ikhokha-carousel-nav {
  position: absolute;
  top: 40px; /* Center relative to collapsed card height (80px / 2) */
  transform: translateY(-50%);
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  color: #1D1D1B;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.ikhokha-carousel-nav:hover {
  background: #009EAC;
  color: #1D1D1B;
}
.ik-nav-left { left: -50px; }
.ik-nav-right { right: -50px; }

#amountOutput, #monthsOutput {
  position: relative;
  font-weight: bold;
}

/* =============================================================================
   Wallet icon and R currency symbol 
   ============================================================================= */
#amountOutput::before {
  content: "";
  display: block;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url('/static/images/wallet.png');
  z-index: 1;
}

#amountOutput::after {
  content: "R";
  position: relative;
  display: inline-block;
  margin-right: 4px;
  font-size: inherit;
  color: inherit;
  font-weight: bold;
  order: -1;
}

#amountOutput {
  position: relative;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  flex-direction: row;
}

/* =============================================================================
   Months Output
   ============================================================================= */
#monthsOutput::before {
  content: "";
  display: block;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0;
  background-image: url('/static/images/calendar.png');
}

#amountOutput span, #monthsOutput span {
  display: inline-block;
  width: calc(100% - 0px); 
  text-align: center;
}

/* =============================================================================
   Apply Button
   ============================================================================= */
.btn,
input[type="submit"] {
  background: #FFCD00 !important;
  background-image: none !important;
  color: #1D1D1B !important;
  font-weight: bold !important;
}

.btn:hover,
input[type="submit"]:hover {
  background: #FFCD00 !important;
  background-image: none !important;
  color: #1D1D1B !important;
  font-weight: bold !important;
}

/* =============================================================================
   White Container Border
   ============================================================================= */
.white-container {
  border: 1px solid #000 !important;
}

/* =============================================================================
   Tooltip
   ============================================================================= */
.tooltip:after,
[data-tooltip]:after {
  background-color: #FFCD00 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #000;
}
.tooltip:before,
[data-tooltip]:before {
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-top-color: #FFCD00 !important;
}
.tooltip:last-child:after,
[data-tooltip]:last-child:after {
  left: auto !important;
  right: 0 !important;
  margin-left: 0 !important;
  transform: translateX(0) !important;
}

/* =============================================================================
   Final Tooltip (prevents cutoff)
   ============================================================================= */
.results .value:last-of-type .tooltip:after,
.results .value:last-of-type [data-tooltip]:after {
  left: auto !important;
  right: 0 !important;
  margin-left: 0 !important;
  transform: translateX(0) !important;
}

.results .tooltip,
.results [data-tooltip] {
  position: relative;
}
.results .tooltip:after,
.results [data-tooltip]:after {
  left: 100% !important;
  transform: translateX(-90%) !important;
}
.results .tooltip:before,
.results [data-tooltip]:before {
  left: 100% !important;
  transform: translateX(-90%) !important;
}
.results .value {
  background: linear-gradient(135deg, #f8fafa 0%, #e6f2f2 100%) !important;
}

/* =============================================================================
   Error Icon
   ============================================================================= */
.feature-icon img[src$="/shared/images/error.png"] {
  content: url('/static/images/ikerror.png');
}

/* =============================================================================
   Form containers for better layout
   ============================================================================= */
.form-group,
.field-container {
    margin-bottom: 20px !important;
}

/* =============================================================================
   Contract details container
   ============================================================================= */
.contract-details-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* =============================================================================
   Single column for mobile
   ============================================================================= */
@media (max-width: 600px) {
    .contract-details-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 15px !important;
    }
}

/* =============================================================================
   Main heading
   ============================================================================= */
h1, h2, .contract-title {
    text-align: center !important;
    font-weight: bold !important;
    margin-bottom: 30px !important;
    color: #1D1D1B !important;
}

.white-container h2 {
  font-weight: bold !important;
}

/* =============================================================================
   iKhokha Contract Summary Container
   ============================================================================= */

/* iKhokha editable field styling */
input:not([readonly]):not([disabled]),
select:not([readonly]):not([disabled]),
textarea:not([readonly]):not([disabled]),
input:not(.readonly),
select:not(:disabled),
input.error,
select.error,
textarea.error,
#company_registration_name:not(.readonly),
#company_registration_number:not(.readonly) {
  border-bottom: 2px solid #FFCD00 !important;
}

/* iKhokha validation error styling */
input.validation-error,
select.validation-error,
textarea.validation-error {
  border-bottom: 2px solid #FF0000 !important;
}

.range-sliders button {
  color: #000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
}
.range-sliders button:hover {
  color: #333 !important;
}

/* =============================================================================
   Size of 'R' on Success screen
   ============================================================================= */
img[src*='images/R.png'] {
  max-width: 100px;
  max-height: 100px;
  height: auto;
  width: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================================
   Custom Ikhokha Checkbox
   ============================================================================= */
input[type="checkbox"] {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
  width: 20px !important;
  height: 20px !important;
  margin-right: 8px !important;
  accent-color: #FFCD00 !important;
  display: inline-block !important;
  vertical-align: top !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
  top: 2px !important;
}

label {
  font-weight: bold !important;
  font-size: 14px !important;
  color: #1D1D1B !important;
  display: inline-block !important;    
  margin-bottom: 0 !important;          
  vertical-align: middle !important;    
}

input[type="checkbox"] {
  vertical-align: middle !important;
}

/* =============================================================================
   Hide Carousel on Error Pages
   ============================================================================= */
/* hide carousel when error icon is present */
.feature-icon img[src*="error.png"] ~ * .ikhokha-carousel-container,
body:has(.feature-icon img[src*="error.png"]) .intro .ikhokha-carousel-container,
.feature-icon img[src*="error.png"] ~ * .carousel-progress-container,
body:has(.feature-icon img[src*="error.png"]) .carousel-progress-container {
  display: none !important;
}

@media (max-width: 600px) {
  .amount-slider, .months-slider {
    margin: 1.5rem 0;
  }
  .output-value {
    height: 60px !important;
    line-height: 60px !important;
    font-size: 17px !important;
    min-width: 200px;
  }
  #amountOutput, #monthsOutput {
    font-size: 17px !important;
  }
  .dragbar {
    padding: 1.2em 35px !important;
  }
}

/* =============================================================================
   iKhokha Footer Logo - Simple static footer at bottom of content
   ============================================================================= */
/* Override the default hidden state to enable footer for iKhokha */
.footer-logo-container {
  display: block !important;
  background: transparent !important;
  border: none !important;
  padding: 20px 16px !important;
  text-align: center !important;
  margin-top: 40px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure footer shows when JavaScript adds the 'show' class */
.footer-logo-container.show {
  display: block !important;
}

.powered-by-text {
  color: #666666 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

.footer-logo-image {
  height: 40px !important;
  max-width: 160px !important;
}

/* Alternative page-level implementation for edge cases */
.ikhokha-page-footer {
  display: none; /* Hidden by default, shown only if needed */
  background: #1D1D1B;
  border-top: 2px solid #FFCD00;
  padding: 16px 0;
  text-align: center;
  margin-top: 40px;
}

.ikhokha-page-footer .footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ikhokha-page-footer .powered-by-text {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
}

.ikhokha-page-footer .footer-logo-image {
  height: 40px;
  max-width: 140px;
}

@media only screen and (max-width: 767px) {
  .footer-logo-container {
    padding: 16px 12px !important;
    margin-top: 30px !important;
  }
  
  .powered-by-text {
    font-size: 12px !important;
  }
  
  .footer-logo-image {
    height: 34px !important;
    max-width: 130px !important;
  }
  
  /* Mobile page footer */
  .ikhokha-page-footer {
    padding: 12px 0;
    margin-top: 30px;
  }
  
  .ikhokha-page-footer .powered-by-text {
    font-size: 14px;
  }
  
  .ikhokha-page-footer .footer-logo-image {
    height: 32px;
    max-width: 120px;
  }
}

/* =============================================================================
   Mobile responsive for results boxes
   ============================================================================= */
@media (max-width: 600px) {
  .results {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 4px !important;
    margin: 1em 0 !important;
  }
  .results .value {
    height: 45px !important;
    line-height: 45px !important;
    min-height: unset !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    margin-top: auto !important;
  }
  .results .title {
    padding: 5px 0 !important;
    font-size: 12px !important;
    white-space: normal !important;
    align-self: flex-start !important;
  }
     /* Make labels and values more inline-like by reducing spacing */
   .results > div {
     display: flex;
     flex-direction: column;
     justify-content: flex-start;
     align-items: stretch;
   }
 }

/* =============================================================================
   Prevent tooltip cutoff on mobile
   ============================================================================= */
@media (max-width: 600px) {
  #main-content {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .results,
  .results .text-with-tip,
  .results .title,
  .results .value,
  .white-container {
    overflow: visible !important;
  }

  /* Center tooltip over the icon and keep it within viewport */
  .results .tooltip:after,
  .results [data-tooltip]:after {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    display: inline-block !important;
    width: max-content !important;
    max-width: calc(100vw - 48px) !important; 
    min-width: 140px !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  /* Left-side tooltips: center arrow over icon */
  .results > div:nth-child(odd) .tooltip:before,
  .results > div:nth-child(odd) [data-tooltip]:before {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  /* Right-side tooltips: align to right edge to prevent cutoff */
  .results > div:nth-child(even) .tooltip:after,
  .results > div:nth-child(even) [data-tooltip]:after {
    left: auto !important;
    right: 0 !important;
    transform: translateX(0) !important;
  }

  .results > div:nth-child(even) .tooltip:before,
  .results > div:nth-child(even) [data-tooltip]:before {
    left: auto !important;
    right: 50% !important; /* center over the icon */
    transform: translateX(50%) !important;
  }
}

/* =============================================================================
   Readvance: contain tooltips within each results cell and center to icon
   ============================================================================= */
@media (max-width: 600px) {
  .results.readvance .text-with-tip {
    position: relative !important;
  }
  .results.readvance .tooltip,
  .results.readvance [data-tooltip] {
    position: static !important;
  }
  .results.readvance .tooltip:after,
  .results.readvance [data-tooltip]:after {
    left: var(--tip-center, 50%) !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 16px) !important; 
    width: max-content !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  .results.readvance .text-with-tip .tooltip:before,
  .results.readvance .text-with-tip [data-tooltip]:before {
    left: var(--arrow-center, 50%) !important;
    right: auto !important;
    margin-left: 0 !important;
    transform: translateX(-50%) !important;
  }
}

/* =============================================================================
   PDF Modal Viewer for OSPA
   ============================================================================= */
.pdf-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

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

.pdf-modal-content {
  position: relative;
  background-color: #fff;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.pdf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #1D1D1B;
  color: white;
  border-radius: 12px 12px 0 0;
}

.pdf-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.pdf-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.pdf-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.pdf-modal-body {
  flex: 1;
  padding: 0;
  background: #f8f9fa;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  transition: opacity 0.3s ease;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.pdf-modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #666;
  font-size: 16px;
}

.pdf-modal-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #009EAC;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile PDF.js Viewer Styles */
.pdf-mobile-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pdf-mobile-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #f8f9fa;
  border-bottom: 2px solid #FFCD00;
  flex-shrink: 0;
}

.pdf-nav-btn {
  background: #1D1D1B;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 70px;
}

.pdf-nav-btn:hover:not(:disabled) {
  background: #333333;
  transform: translateY(-1px);
}

.pdf-nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.pdf-page-info {
  font-size: 14px;
  font-weight: 600;
  color: #1D1D1B;
  text-align: center;
  flex: 1;
  margin: 0 16px;
}

.pdf-canvas-container {
  flex: 1;
  overflow: auto;
  background: #f5f5f5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pdf-mobile-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #666;
  font-size: 16px;
  z-index: 1;
}

#pdf-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: white;
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
  .pdf-modal-content {
    width: 95%;
    height: 95%;
    max-width: none;
    max-height: none;
  }
  
  .pdf-modal-header {
    padding: 15px 20px;
  }
  
  .pdf-modal-header h3 {
    font-size: 1.25rem;
  }
  
  .pdf-modal-close {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
  
  .pdf-modal-loading {
    font-size: 14px;
  }
  
  .pdf-modal-loading .spinner {
    width: 32px;
    height: 32px;
  }
  
  /* Mobile PDF.js viewer adjustments */
  .pdf-mobile-controls {
    padding: 10px 16px;
  }
  
  .pdf-nav-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 60px;
  }
  
  .pdf-page-info {
    font-size: 13px;
    margin: 0 12px;
  }
  
  .pdf-canvas-container {
    padding: 16px;
  }
}

/* Extra small screens and iframe optimizations */
@media (max-width: 400px) {
  .pdf-modal-content {
    width: 98%;
    height: 98%;
    border-radius: 8px;
  }
  
  .pdf-modal-header {
    padding: 12px 16px;
  }
  
  .pdf-modal-header h3 {
    font-size: 1.1rem;
  }
  
  .pdf-modal-close {
    font-size: 1.25rem;
    width: 30px;
    height: 30px;
  }
  
  /* Extra small mobile PDF.js viewer adjustments */
  .pdf-mobile-controls {
    padding: 8px 12px;
  }
  
  .pdf-nav-btn {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 50px;
  }
  
  .pdf-page-info {
    font-size: 12px;
    margin: 0 8px;
  }
  
  .pdf-canvas-container {
    padding: 12px;
  }
}

/* Media query to prevent overflow on mobile */
@media only screen and (max-width: 767px) {
  .white-container {
    height: auto !important;
    overflow-y: auto !important;
  }
}

