/* Global body background for all pages */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100vh;
}

body {
  background: #e2e8f0;
  min-height: 100vh;
  height: 100vh;
  background-attachment: fixed;
  background-size: cover;
}

#logo {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 36px !important; /* Reduced by 30% from 52px */
  width: auto !important; /* Let width adjust automatically */
}

/* Video Modal Standardized Sizing */
.video-modal .modal-dialog {
    max-width: 1200px !important; /* Fixed maximum width for consistency */
    width: 90vw !important; /* Responsive but capped */
    margin: 1.75rem auto !important;
    height: auto !important;
}

/* Individual modal targeting for backward compatibility */
#videoModal .modal-dialog,
#videoModal1 .modal-dialog,
#videoModal2 .modal-dialog {
    max-width: 1200px !important; /* Fixed maximum width for consistency */
    width: 90vw !important; /* Responsive but capped */
    margin: 1.75rem auto !important;
    height: auto !important;
}

#videoModal .modal-content,
#videoModal1 .modal-content,
#videoModal2 .modal-content {
    width: 100%; /* Full width of modal dialog */
    height: auto;
    max-height: 90vh; /* Maximum height to prevent overflow */
}

#videoModal .modal-body,
#videoModal1 .modal-body,
#videoModal2 .modal-body {
    padding: 1rem;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#videoModal .modal-video,
#videoModal1 .modal-video,
#videoModal2 .modal-video {
    width: 100%; /* Full width of modal body */
    height: auto;
    max-height: 70vh; /* Consistent maximum height */
    margin: 0 auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive adjustments for different screen sizes */
@media screen and (max-width: 1366px) {
    .video-modal .modal-dialog,
    #videoModal .modal-dialog,
    #videoModal1 .modal-dialog,
    #videoModal2 .modal-dialog {
        max-width: 1000px !important;
        width: 95vw !important;
    }

    .video-modal .modal-video,
    #videoModal .modal-video,
    #videoModal1 .modal-video,
    #videoModal2 .modal-video {
        max-height: 60vh;
    }
}

@media screen and (max-width: 768px) {
    .video-modal .modal-dialog,
    #videoModal .modal-dialog,
    #videoModal1 .modal-dialog,
    #videoModal2 .modal-dialog {
        max-width: 95vw !important;
        width: 95vw !important;
        margin: 0.5rem auto !important;
    }

    .video-modal .modal-video,
    #videoModal .modal-video,
    #videoModal1 .modal-video,
    #videoModal2 .modal-video {
        max-height: 50vh;
    }
}

/* Utility class for consistent video modal sizing */
.video-modal-standard {
    max-width: 1200px !important;
    width: 90vw !important;
}

.video-modal-standard .modal-dialog {
    max-width: 1200px !important;
    width: 90vw !important;
}

.video-modal-standard .modal-content {
    width: 100% !important;
}

.video-modal-standard .modal-video {
    width: 100% !important;
    max-height: 70vh !important;
}

.navbar-nav {
  margin-left: 150px; /* Moves all the items in the navbar to the right by 100px */
}

/* Prevent wrapping on larger screens */
.navbar-nav .nav-item .nav-link {
  white-space: nowrap; /* Prevent wrapping */
}


/* Apply custom opacity to modal backdrop */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5) !important; /* 50% opacity */
}

/* Bootstrap modal header customization */
.video-modal-header {
  background-color: rgb(37, 110, 194);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.video-modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-submenu > a:after {
  display: block;
  content: " ";
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #ccc;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* Override Bootstrap navbar font sizes */
.navbar {
  font-size: 0.8em; /* Reduced from default 1em by 20% */
}

.navbar .nav-link {
  font-size: 0.8em; /* Reduced from default 1em by 20% */
}

.navbar .dropdown-item {
  font-size: 0.8em; /* Reduced from default 1em by 20% */
}

/* Override the project name text size */
.navbar li[style*="margin-left: 100px"] {
  font-size: calc(0.16rem + 0.8vw) !important; /* Reduced from calc(0.2rem + 1vw) by 20% */
  line-height: 32px !important; /* Reduced from 40px by 20% */
}

@media (min-width: 1200px) {
  .h1, h1 {
    font-size: 1.7rem !important; /* Reduced from 2.5rem by 20% */
  }
}

/* Project Name Validation Feedback Styles */
.project-name-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.project-name-feedback.text-danger {
    color: #dc3545;
    font-weight: 500;
}

.project-name-feedback.text-warning {
    color: #ffc107;
    font-weight: 500;
}

.project-name-feedback.text-success {
    color: #198754;
    font-weight: 500;
}

.validation-suggestions {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    border-radius: 0.25rem;
}

.validation-suggestions small {
    color: #6c757d;
    line-height: 1.4;
}

.validation-suggestions strong {
    color: #495057;
}

/* Input field styling for validation states */
input[name="NewProject"]:invalid,
input[name="CloneProject"]:invalid,
input[name="RenameProject"]:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input[name="NewProject"]:valid,
input[name="CloneProject"]:valid,
input[name="RenameProject"]:valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Animation for feedback appearance */
.project-name-feedback,
.validation-suggestions {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
