/* Complete Professional Modal CSS for Excursions with Mobile Display Fixes
 * Updated to ensure content displays properly on all devices
 * Last updated: April 30, 2025
 */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
  }
  
  .modal.active {
    opacity: 1;
    display: flex;
  }
  
  /* Modal Content Container */
  .modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 1000px;
    width: 95%;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    margin: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    overflow: hidden;
  }
  
  .modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
  }
  
  /* Close Button */
  .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1;
  }
  
  .close-modal:hover {
    background-color: #f7b731;
    color: #000000;
    transform: scale(1.1);
  }
  
  /* Modal Body Layout */
  .modal-body {
    display: flex;
    flex-direction: row;
    max-height: 90vh;
    height: auto;
  }
  
  /* Image Section */
  .modal-image {
    width: 45%;
    position: relative;
    flex-shrink: 0;
    height: auto;
    min-height: 450px;
    background-color: #f0f0f0;
  }
  
  .modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  /* Image Badges */
  .modal-image .price-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f7b731;
    color: #000000;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5;
  }
  
 
  
  /* Image Overlay Gradient */
  .modal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0) 30%,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
    pointer-events: none;
  }
  
  /* Details Section */
  .modal-details {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  /* Modal Title */
  .modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #222222;
    margin: 0 0 15px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
  }
  
  /* Stats Section */
  .modal-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
    font-size: 16px;
  }
  
  .rating {
    display: inline-flex;
    align-items: center;
    color: #333;
  }
  
  .rating i {
    color: #f7b731;
    margin-right: 5px;
  }
  
  .reviews {
    display: inline-flex;
    align-items: center;
    color: #555;
  }
  
  .reviews i {
    color: #3498db;
    margin-right: 5px;
  }
  
  /* Categories */
  .modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
  }
  
  .category-tag {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .category-tag:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
  }
  
  /* Description */
  .modal-description {
    font-size: 16px;
    line-height: 1.7;
    color: #444444;
    margin-bottom: 25px;
    font-weight: 400;
  }
  
  /* Tour Pricing */
  .tour-pricing {
    background: #2c3e50;
    color: white;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
  }
  
  .tour-price-option {
    text-align: center;
    padding: 20px 15px;
    flex: 1;
  }
  
  .tour-price-option:first-child {
    background: rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .tour-price-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .tour-price-value {
    font-size: 24px;
    font-weight: 700;
    color: #f7b731;
  }
  
  /* Features */
  .modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
  }
  
  .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #555555;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
  }
  
  .feature i {
    color: #f7b731;
    font-size: 18px;
    width: 20px;
    text-align: center;
  }
  
  /* Special Features for Different Excursion Types */
  .feature .fa-bed,
  .feature .fa-utensils,
  .feature .fa-mug-hot {
    color: #e74c3c;
  }
  
  .feature .fa-hiking,
  .feature .fa-mountain {
    color: #27ae60;
  }
  
  /* Options */
  .modal-options {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .option-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }
  
  .option {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .option-label {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
  }
  
  .option-price {
    font-size: 20px;
    color: #333333;
    font-weight: 700;
  }
  
  .option-notes {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .option-note {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding-left: 20px;
    position: relative;
    font-style: italic;
  }
  
  .option-note:before {
    content: '•';
    position: absolute;
    left: 5px;
    color: #f7b731;
  }
  
  /* Upgrade Options for Multi-day Excursions */
  .hotel-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
  }
  
  .upgrade-note {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
  }
  
  .upgrade-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .upgrade-option {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
  }
  
  /* Highlight Note */
  .highlight-note {
    background-color: #fff8e5;
    border-left: 3px solid #f7b731;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #555;
  }
  
  .highlight-note i {
    color: #f7b731;
    font-size: 16px;
    margin-top: 2px;
  }
  
  /* Cancellation Information */
  .cancellation-info {
    background-color: #e8f4fd;
    border-left: 3px solid #3498db;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #555;
  }
  
  .cancellation-info i {
    color: #3498db;
    font-size: 16px;
    margin-top: 2px;
  }
  
  /* Action Buttons */
  .modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
  }
  
  .modal-actions .btn-primary,
  .modal-actions .btn-outline {
    flex: 1;
    padding: 14px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .modal-actions .btn-primary {
    background: #f7b731;
    color: #000000;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .modal-actions .btn-primary:hover {
    background: #e6a610;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  }
  
  .modal-actions .btn-outline {
    background: transparent;
    color: #333333;
    border: 2px solid #dddddd;
  }
  
  .modal-actions .btn-outline:hover {
    border-color: #bbbbbb;
    background: #f8f8f8;
    transform: translateY(-3px);
  }
  
  /* Tour Details Section for Multi-day Excursions */
  .tour-details {
    margin-top: 25px;
    margin-bottom: 25px;
  }
  
  .tour-details-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }
  
  .tour-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .tour-details-item {
    position: relative;
    padding: 0 0 15px 30px;
    margin-bottom: 15px;
    border-left: 2px dashed #f7b731;
  }
  
  .tour-details-item:last-child {
    border-left: none;
    margin-bottom: 0;
  }
  
  .tour-details-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    background: #f7b731;
    border-radius: 50%;
  }
  
  .tour-details-day {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
  }
  
  .tour-details-text {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
  }
  
  /* Inclusions/Exclusions for All Excursions */
  .inclusions-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
  }
  
  .inclusions, .exclusions {
    flex: 1;
  }
  
  .inclusions-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .inclusions-title i {
    color: #27ae60;
  }
  
  .exclusions-title i {
    color: #e74c3c;
  }
  
  .inclusions-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .inclusions-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
  }
  
  .inclusions-list li:before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #27ae60;
  }
  
  .exclusions-list li:before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #e74c3c;
  }
  
  /* Loading State */
  .modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
  }
  
  .modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f7b731;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Animations */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  
  .modal-title,
  .modal-stats,
  .modal-categories,
  .modal-description,
  .tour-pricing,
  .modal-features,
  .modal-options,
  .tour-details,
  .inclusions-container,
  .modal-actions {
    animation: slideUp 0.5s ease forwards;
    animation-fill-mode: both;
  }
  
  .modal-title { animation-delay: 0.1s; }
  .modal-stats { animation-delay: 0.15s; }
  .modal-categories { animation-delay: 0.2s; }
  .modal-description { animation-delay: 0.25s; }
  .tour-pricing { animation-delay: 0.3s; }
  .modal-features { animation-delay: 0.35s; }
  .modal-options { animation-delay: 0.4s; }
  .tour-details { animation-delay: 0.45s; }
  .inclusions-container { animation-delay: 0.5s; }
  .modal-actions { animation-delay: 0.55s; }
  
  /* Fixed desktop layout to ensure image fills the entire height */
  @media (min-width: 769px) {
    /* Modal body container */
    .modal-body {
      display: flex;
      height: auto;
      overflow: hidden;
    }
    
    /* Fix image container to take full height */
    .modal-image {
      width: 45%;
      position: relative;
      overflow: hidden;
      min-height: 450px !important;
      height: 100% !important;
      display: flex;
      flex: 0 0 45%;
    }
    
    /* Make image fill the entire container */
    .modal-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
    
    /* Fix for modal content layout */
    .modal-content {
      display: flex;
      flex-direction: column;
      height: auto;
      width: 90%;
      max-width: 1000px;
      max-height: 95vh;
      margin: auto;
    }
    
    /* Fix scrolling in details section */
    .modal-details {
      flex: 1;
      overflow-y: auto;
      max-height: 650px;
      padding: 30px;
    }
  }
  
  /* CRITICAL MOBILE FIXES - ensures content displays on mobile */
  @media (max-width: 768px) {
    /* Critical modal basic structure fixes */
    .modal-content {
      width: 100% !important;
      max-width: 95% !important;
      max-height: 90vh !important;
      display: flex !important;
      flex-direction: column !important;
      overflow: hidden !important;
      border-radius: 12px !important;
    }
    
    /* Force modal body to display properly */
    .modal-body {
      display: flex !important;
      flex-direction: column !important;
      width: 100% !important;
      height: auto !important;
      max-height: 90vh !important;
      overflow: auto !important;
    }
    
    /* Force image section to display */
    .modal-image {
      width: 100% !important;
      height: 200px !important;
      min-height: 200px !important;
      position: relative !important;
      display: block !important;
      overflow: hidden !important;
      flex: none !important;
    }
    
    /* Force image to display properly */
    .modal-image img {
      width: 100% !important;
      height: 100% !important;
      object-fit: cover !important;
      display: block !important;
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
    }
    
    /* Force details section to display */
    .modal-details {
      width: 100% !important;
      padding: 15px !important;
      display: block !important;
      overflow-y: auto !important;
      flex: 1 !important;
      max-height: calc(90vh - 200px) !important;
    }
    
    /* Force modal title to display */
    .modal-title {
      display: block !important;
      font-size: 22px !important;
      margin-bottom: 10px !important;
      color: #333 !important;
    }
    
    /* Force description to display */
    .modal-description {
      display: block !important;
      margin-bottom: 15px !important;
      font-size: 14px !important;
      line-height: 1.5 !important;
      color: #555 !important;
    }
    
    /* Force tour pricing to display */
    .tour-pricing {
      display: flex !important;
      flex-direction: column !important;
      margin-bottom: 15px !important;
      background: #2c3e50 !important;
      border-radius: 8px !important;
      overflow: hidden !important;
    }
    
    /* Force price options to display */
    .tour-price-option {
      padding: 15px !important;
      text-align: center !important;
    }
    
    /* Force price labels to display */
    .tour-price-label {
      display: block !important;
      color: #fff !important;
      opacity: 0.9 !important;
      font-size: 14px !important;
      margin-bottom: 5px !important;
    }
    
    /* Force price values to display */
    .tour-price-value {
      display: block !important;
      color: #f7b731 !important;
      font-size: 20px !important;
      font-weight: bold !important;
    }
    
    /* Force buttons to display */
    .modal-actions {
      display: flex !important;
      flex-direction: column !important;
      gap: 10px !important;
      margin-top: 20px !important;
      position: sticky !important;
      bottom: 0 !important;
      background: white !important;
      padding: 15px !important;
      z-index: 100 !important;
    }
    
    /* Force primary button to display */
    .modal-actions .btn-primary {
      display: block !important;
      width: 100% !important;
      padding: 12px !important;
      text-align: center !important;
      background: #f7b731 !important;
      color: #000 !important;
      border-radius: 8px !important;
      font-weight: bold !important;
      text-decoration: none !important;
    }
    
    /* Force outline button to display */
    .modal-actions .btn-outline {
      display: block !important;
      width: 100% !important;
      padding: 12px !important;
      text-align: center !important;
      background: #f5f5f5 !important;
      color: #333 !important;
      border-radius: 8px !important;
      font-weight: bold !important;
      border: none !important;
    }
    
    /* Make sure buttons are visible at bottom */
    .modal-details {
      padding-bottom: 80px !important;
    }
    
    /* Ensure features display properly */
    .modal-features {
      display: flex !important;
      flex-direction: column !important;
      gap: 10px !important;
    }
    
    .feature {
      width: 100% !important;
    }
    
    /* Fix for inclusions section */
    .inclusions-container {
      flex-direction: column !important;
      gap: 20px !important;
    }
  }