.card.border-primary {
    border: 2px solid #007bff !important;
}
.card.shadow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.card-locked .card {
    border-color:#ba9800 !important;
}
.card-locked .lock-btn {
    background-color: #ba9800;
    border-color: #ba9800;
}
.card-locked .edit-icon {
    display: none;
}
.card-terminated .card {
    border-color:#dc3545 !important;
}
.card-terminated .card * {
    opacity: 0.75;
}
body > .container {
    min-height: 99vh;
}
body > .hero-container {
    min-height: 45vh;
    background: linear-gradient(135deg, rgba(80, 200, 245, 0.8) 0%, rgba(56, 222, 203, 0.8) 50%, rgba(175, 253, 47, 0.8) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body > .hero-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Dark theme - fade to dark background instead of white */
[data-bs-theme="dark"] body > .hero-container::after {
    background: linear-gradient(to bottom, rgba(33,37,41,0) 0%, rgba(33,37,41,1) 100%);
}

/* Status history styling */
.status-history {
    font-size: 0.85rem;
}

.status-history h6 {
    font-size: 0.9rem;
    color: #495057;
}

.status-history .table-sm td,
.status-history .table-sm th {
    padding: 0.3rem 0.5rem;
    border-top: 1px solid #dee2e6;
}

.status-history .table-sm th {
    background-color: #f8f9fa;
    font-weight: 600;
}

[data-bs-theme="dark"] .status-history h6 {
    color: #adb5bd;
}

[data-bs-theme="dark"] .status-history .table-sm th {
    background-color: #495057;
    color: #fff;
}

.btn-status-badge {
    cursor: pointer;
}

/* Fixed options toggle styles */
.fixed-option {
    transition: opacity 0.3s ease-in-out;
}

.fixed-option.d-none {
    display: none !important;
}

.fixed-options-toggle-container {
    margin: 1.5rem 0;
}

.fixed-options-separator {
    margin: 1rem 0 0.75rem 0;
    border-top: 1px solid #dee2e6;
    opacity: 0.5;
}

[data-bs-theme="dark"] .fixed-options-separator {
    border-top-color: #495057;
}

.toggle-fixed-options {
    font-size: 0.875rem;
    color: #6c757d !important;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: rgba(0,0,0,0.05);
    border: 1px solid transparent;
}

.toggle-fixed-options:hover {
    color: #495057 !important;
    text-decoration: none;
    background-color: rgba(0,0,0,0.1);
    border-color: #dee2e6;
}

[data-bs-theme="dark"] .toggle-fixed-options {
    color: #adb5bd !important;
    background-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .toggle-fixed-options:hover {
    color: #dee2e6 !important;
    background-color: rgba(255,255,255,0.1);
    border-color: #495057;
}
body > .hero-container > * {
    position: relative;
    z-index: 2;
}
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.spin {
    animation: spin 1s linear infinite;
}

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

/* vimeo classes embed-responsive embed-responsive-16by9
*/
.embed-responsive {
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    border: 0;
}

.embed-responsive-16by9 {
    padding-bottom: 56.25%;
}

/* Template Cards Styling */
.template-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.template-card .card-img-top {
    height: 160px;
    object-fit: cover;
}

/* Fixed-height wrapper for video in template cards */
.template-card .video-container {
    position: relative;
    width: 100%;
    height: 160px;      /* Fixed container height */
    overflow: hidden;
    background: #000;   /* Background for letterboxing */
}

/* Video inside container with cover effect */
.template-card .template-video {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Ensures the video covers the container, cropping if needed */
}

.template-card .card-title {
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.template-card .card-text {
    font-size: 0.9rem;
    min-height: 60px;
}

/* Template Cards Horizontal Scrolling - For both desktop and mobile */
#templateCards {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 15px; /* Space for scroll indicator */
  flex-wrap: nowrap !important; /* Override Bootstrap's flex-wrap */
}

#templateCards > div {
  scroll-snap-align: center;
  flex: 0 0 auto; /* Don't grow or shrink */
}

/* Mobile specific styles */
@media (max-width: 767px) {
  #templateCards > div {
    width: 83% !important; /* Force 83% width on mobile */
    margin-right: 10px;
    max-width: 83% !important; /* Override Bootstrap col width */
  }
}

/* Desktop specific styles */
@media (min-width: 768px) {
  #templateCards > div {
    width: 33.333% !important; /* Force width for desktop */
    max-width: 33.333% !important;
    padding: 0 10px;
  }
  
  /* On larger screens, ensure we see 3 items */
  #templateCards > div:nth-child(3n) {
    margin-right: 0;
  }
}

#templateCards::-webkit-scrollbar {
  height: 4px;
}

#templateCards::-webkit-scrollbar-thumb {
  background-color: #007bff;
  border-radius: 4px;
}

/* Template Scroll Buttons - Show on all screen sizes */
.template-scroll-buttons {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
  display: block !important;
}

.template-scroll-buttons .btn {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}

.template-scroll-buttons .btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.template-scroll-buttons .btn-scroll-left {
  left: 10px;
}

.template-scroll-buttons .btn-scroll-right {
  right: 10px;
}

/* Show scroll buttons only on mobile */
@media (max-width: 767px) {
  .template-scroll-buttons {
    display: block !important;
  }
}

/* Update Template Cards Container with padding for buttons */
.tempalte-scoll-position-relative {
  position: relative;
  padding: 0 50px; /* Add padding on both sides to make room for buttons */
}

.tempalte-scoll-position-relative #templateCards {
  padding-bottom: 0;
  margin-bottom: 15px;
}

/* Adjust button positioning for desktop */
@media (min-width: 768px) {
  .template-scroll-buttons .btn-scroll-left {
    left: -50px;
  }

  .template-scroll-buttons .btn-scroll-right {
    right: 50px;
  }
  
  /* Make buttons slightly larger on desktop */
  .template-scroll-buttons .btn {
    width: 45px;
    height: 45px;
  }
}

/* Keep smaller buttons closer to content on mobile */
@media (max-width: 767px) {
  .tempalte-scoll-position-relative {
    padding: 0 15px;
  }
  
  .template-scroll-buttons .btn-scroll-left {
    left: -20px;
  }
  
  .template-scroll-buttons .btn-scroll-right {
    right: 4px;
  }
}

/* Figure and image styling for retina images */
@media (min-width: 768px) {
  #mt-content-content .figure {
      max-width: 50%;
      margin: 0 auto;
      display: block;
  }

  #mt-content-content .mt-content-image-layout .figure,
  #mt-content-content .figure-img {
      max-width: 100%;
      height: auto;
      margin: 0 auto;
  }
}

/* MT-Content responsive image and video layouts - desktop only */
@media (min-width: 768px) {
  /* Ensure images and videos in responsive layout are properly sized */
  .mt-content-image-layout .col-md-5 img,
  .mt-content-image-layout .col-md-5 .figure,
  .mt-content-image-layout .col-md-7 img,
  .mt-content-image-layout .col-md-7 .figure {
    max-width: 100%;
    height: auto;
  }
  
  /* Video containers maintain their aspect ratio and sizing in both 5 and 7 column layouts */
  .mt-content-image-layout .col-md-5 .ratio,
  .mt-content-image-layout .col-md-5 .embed-responsive,
  .mt-content-image-layout .col-md-7 .ratio,
  .mt-content-image-layout .col-md-7 .embed-responsive {
    width: 100%;
    /* Do not override height to preserve aspect ratio */
  }
  
  /* Iframes inside ratio containers should fill their container */
  .mt-content-image-layout .col-md-5 .ratio iframe,
  .mt-content-image-layout .col-md-5 .embed-responsive iframe,
  .mt-content-image-layout .col-md-7 .ratio iframe,
  .mt-content-image-layout .col-md-7 .embed-responsive iframe {
    width: 100%;
    height: 100%;
  }
  
  /* Ensure proper vertical alignment for both images and videos */
  .mt-content-image-layout {
    align-items: flex-start;
  }
}

/* On mobile, reset any desktop-specific styling */
@media (max-width: 767px) {
  .mt-content-image-layout .col-md-7,
  .mt-content-image-layout .col-md-5 {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Country flag styling */
.location-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    z-index: 1;
}

/* Inline country flag styling for consistent inline display */
.location-flag-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    vertical-align: middle;
    margin: 0 4px;
}

/* Enhance the appearance of the boolean switches */
.form-switch .form-check-input {
    cursor: pointer;
    width: 3rem !important;
    height: 1.5rem !important;
}

.form-switch .form-check-label {
    cursor: pointer;
    padding-left: 0.5rem;
}

/* Iframe Mode Styling */
body.iframe-mode {
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
}

/* Hide unnecessary elements in iframe mode */
body.iframe-mode .hide-in-iframe,
body.iframe-mode .whatsapp-float,
body.iframe-mode #top-ad-banner,
body.iframe-mode .trooper-login-btn-is-logout,
body.iframe-mode .navbar,
body.iframe-mode footer,
body.iframe-mode header,
body.iframe-mode .footer,
body.iframe-mode #main-header,
body.iframe-mode #filtered-view-alert,
body.iframe-mode .search-container,
body.iframe-mode .search-filter,
body.iframe-mode .budget-box,
body.iframe-mode .page-header,
body.iframe-mode .breadcrumb-section {
    display: none !important;
}

/* in admin mode remove some things */
html.admin-page #top-ad-banner {
    display: none !important; /* Hide the top ad banner in admin mode */
}

/* Adjust container styling in iframe mode */
body.iframe-mode > .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
}

/* Adjust main content area in iframe mode */
body.iframe-mode #serverList {
    padding: 10px;
    margin: 0 !important;
}

/* Make cards full width in iframe mode when there's only one */
body.iframe-mode #serverList .server-card:only-child {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* Adjust card spacing in iframe mode */
body.iframe-mode #serverList .server-card {
    padding: 10px;
}

/* Add subtle shadow to make cards stand out in iframe mode */
body.iframe-mode #serverList .card {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Fix row margins in iframe mode */
body.iframe-mode .row {
    margin: 0 !important;
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(0,0,0,0.3) 50px, 
        rgba(0,0,0,0.3) calc(100% - 50px), 
        transparent 100%
    );
    margin: 60px 0;
    opacity: 0.4;
}

/* Dark theme hr with gradient effect */
[data-bs-theme="dark"] hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50px, 
        rgba(255,255,255,0.3) calc(100% - 50px), 
        transparent 100%
    );
    margin: 60px 0;
    opacity: 0.4;
}

/* Dark theme hr in #mt-content-intro with bright purple glow */
[data-bs-theme="dark"] #mt-content-intro hr {
    background: linear-gradient(to right, 
        transparent 0%, 
        #fff 150px, 
        #fff calc(100% - 150px), 
        transparent 100%
    );
    height: 1px;
    opacity: 1;
}

/* r in dropdown not margin */
.dropdown hr {
    margin: 0;
}

/* Promotional Banner Styles */
#top-ad-banner {
    margin: 0;
    border-radius: 0;
    border: none;
    font-weight: 500;
    background: linear-gradient(90deg, #ffeaa7 0%, #fdcb6e 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Fixed positioning applied via JavaScript after page load */
#top-ad-banner.fixed-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
}

#top-ad-banner a {
    color: #2d3436 !important;
    text-decoration: none !important;
}

#top-ad-banner a:hover {
    color: #2d3436 !important;
    text-decoration: none !important;
    opacity: 0.8;
}

/* Style the CTA button in the banner */
#top-ad-banner .btn {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
    transition: all 0.2s ease;
}

#top-ad-banner .btn:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: white !important;
    opacity: 1 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.4);
}

/* Ensure navbar is positioned below the banner */
.navbar {
    position: relative;
    z-index: 1040;
}

/* Logo theme switching */
/* Default (light theme) - show dark logo, hide white logo */
.logo-light-theme {
    display: inline-block;
}

.logo-dark-theme {
    display: none;
}

/* Dark theme - hide dark logo, show white logo */
[data-bs-theme="dark"] .logo-light-theme {
    display: none;
}

[data-bs-theme="dark"] .logo-dark-theme {
    display: inline-block;
}

/* Fade overlay theme support */
.fade-overlay {
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)) !important;
}

[data-bs-theme="dark"] .fade-overlay {
    background: linear-gradient(to bottom, rgba(33,37,41,0), rgba(33,37,41,1)) !important;
}

.list-group + button + #moreFeatures > ul.list-group > .list-group-item:first-child  {
  border-top:none!important;
  border-radius: 0px!important;
}

#features.expanded .list-group-item:last-child  {
  border-radius: 0px!important;
}

/* img in .img-logo-list have radius of 5px and white background */
.img-logo-list img {
    border-radius: 5px;
    max-width: 100%;
    height: auto;
    background-color: white;
}

/* Make standalone buttons rounded pill by default, but not buttons in groups */
.btn:not(.btn-group .btn):not(.template-scroll-buttons .btn):not(.input-group .btn) {
    border-radius: 50rem !important;
}

/* Keep button groups with their original styling */
.btn-group .btn {
    border-radius: 0.375rem;
}

/* First and last buttons in button groups */
.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Keep template scroll buttons circular */
.template-scroll-buttons .btn {
    border-radius: 50% !important;
}

/* Custom primary color theme */
:root {
    --bs-primary: #961CDA;
    --bs-primary-rgb: 150, 28, 218;
}

/* Primary button styling */
.btn-primary {
    background-color: #961CDA !important;
    border-color: #961CDA !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #7a17b8 !important;
    border-color: #7a17b8 !important;
    color: white !important;
}

.btn-primary:active,
.btn-primary.active {
    background-color: #6b1499 !important;
    border-color: #6b1499 !important;
    color: white !important;
}

/* Primary outline button styling */
.btn-outline-primary {
    color: #961CDA !important;
    border-color: #961CDA !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #961CDA !important;
    border-color: #961CDA !important;
    color: white !important;
}

.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #961CDA !important;
    border-color: #961CDA !important;
    color: white !important;
}

/* Primary badge styling */
.badge.bg-primary {
    background-color: #961CDA !important;
}

/* Primary border styling */
.border-primary {
    border-color: #961CDA !important;
}

/* Dark theme headline styling */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: white !important;
}

/* VM-style badge background with text color */
.bg-thirdy {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #6c757d !important;
}

/* Table view styling */
#blibTable .table {
    margin-bottom: 0;
}

#blibTable .table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

#blibTable .table th {
    border-top: none;
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
}

#blibTable .table td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Price column styling for multi-line content */
#blibTable .table td:nth-child(7) {
    white-space: nowrap;
    text-align: center;
}

#blibTable .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.bullet-status {
    font-size: 1.2em;
    margin-right: 0.25rem;
}

tr.table-inactive {
    opacity: 0.5;
}

/* Hide table view on mobile */
@media (max-width: 768px) {
    #tableViewBtn,
    .hide-on-mobile {
        display: none !important;
    }
}