/* 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: 72px !important; /* Larger for visibility */
  width: auto !important; /* Let width adjust automatically */
}

.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 */
}

.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);
    }
}
