.dataTables_wrapper .dataTables_length select{
    padding: .5rem 3rem .5rem 1rem;
}

.data-scrollbar{
    max-height: calc(100vh - 200px) !important;
}

#logo {
  width: 240px;
  transition: width 0.3s ease;
}

/* Shrunk sidebar changes logo size */
.logo-normal.shrunk #logo {
  width: 50px;
}

.custom-button{
    text-align: right;
    padding-right: 1.5rem;
}

.btn-custom {
  background-color: #ffffff;
  border: 1px solid var(--bs-primary-tint-80);
  color: #a67c30;
  transition: all 0.3s ease;
}

.btn-custom:hover {
  background-color: #c19648;
  color: #ffffff;
}

button:hover:not(.btn-custom),
.btn:hover:not(.btn-custom) {
  background-color: #ffffff !important;
  border: 1px solid #c19648 !important;
  color: #a67c30 !important;
  transition: all 0.3s ease;
}

.form-label{
  color: #0c112e;
}

.add-remove-food{
  font-size:32px;
}

.sub-icons{
  font-size:32px;
  color: black;
}

.add-remove-recipe{
  font-size:32px;
}

#meal-wrapper h5{
  margin:30px 0px;
}
#meal-wrapper h6{
  margin-bottom:10px;
}

.sub-row select, .sub-row input {
    flex: 1 1 auto;  
    max-width: calc(100% - 70px); 
}

.sub-icons {
    flex: 0 0 70px;   /* fiksna širina za ikone */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;         /* razmak između ikona */
}

@media only screen and (min-width: 992px) {
  .iq-navbar-header {
    margin-bottom: 40px;
  }
  .mobile-logout{
    display: none;
  }
}
@media only screen and (max-width: 767px) {
  .iq-navbar-header {
    margin-bottom: -40px;
  }
}

@media only screen and (max-width: 992px) {
  .nav-item.dropdown{
    display: none !important;
  }
  nav{
    height: 40px;
  }
}

.hrLine{
  border-top: 2px solid #6c757d;
  width: 95%;
}

.colorGold{
  color: #c19648;
}

.d-slider1 ul.swiper-wrapper {
  margin: 0 auto;
  justify-content: center;
}

.swiper-wrapper li:last-child {
  margin-right: 0px !important;
}

/* Center arrow SVG inside circle progress SVG */
.circle-progress {
  position: relative;
}

.card-slide .card-slie-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  object-fit: cover;
}

/* Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Ensure document upload modal is hidden by default */
#documentUploadModal {
  display: none !important;
}

/* DataTables Responsive - Expand/Collapse Control */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    content: '►';
    display: inline-block;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    content: '▼';
    color: #c19648;
}

/* Responsive child row styling */
table.dataTable > tbody > tr.child ul.dtr-details {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    border-bottom: 1px solid #efefef;
    padding: 8px 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
    border-bottom: none;
}

table.dataTable > tbody > tr.child span.dtr-title {
    display: inline-block;
    font-weight: bold;
    min-width: 150px;
    color: #495057;
}

table.dataTable > tbody > tr.child span.dtr-data {
    color: #6c757d;
}

/* Sadržaj */
.popup-content {
  background: #fff;
  width: 500px;
  max-width: 90%;
  /*margin: 50px auto;*/
  padding: 30px;
  border-radius: 10px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

/* Dugme za zatvaranje */
.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* Forma */
.form-group {
  margin-bottom: 15px;
}

input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
}


/* Animacija */
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}

.nav-link form {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  margin-left: 1rem;
  -webkit-transform: translateX(0);
      -ms-transform: translateX(0);
          transform: translateX(0);
  opacity: 1;
}

.bg-gold {
  background-color: #c19648 !important;
  color: #fff !important;
}

.bg-gold-light {
  background-color: #e6c98f !important;
  color: #000 !important;
}
.border-light-gold {
  border-color: #e6c98f !important;
}
.bg-gold-dark {
  background-color: #8a6a35 !important;
  color: #000 !important;
}
.border-dark-gold {
  border-color: #8a6a35 !important;
}

.card .card-header {
  transition: all 0.3s ease; /* animacija na sve promene */
}
.card .card-header.collapsed {
  border-bottom-left-radius: 0.375rem; /* isti kao gornji */
  border-bottom-right-radius: 0.375rem;
  transform: scale(1.01);
}

.border-red{
  color: #d40808;
}

.cursor-pointer {
  cursor: pointer;
}


/* === USER NAV DROPDOWN STYLING === */
.nav-item.dropdown .nav-link {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #333;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.nav-item.dropdown .nav-link:hover,
.nav-item.dropdown.show .nav-link {
    border-color: #c19648;
    background: #faf7f2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.caption{
  padding: 10px 0px;
}
/* Name (caption-title) */
.caption-title {
    font-size: 18px;
}

/* Dropdown menu itself */
.dropdown-item{
  border-radius: 7px;
}

.border-primary{
  color: #c19648;
}

/* === USER AVATAR INITIALS === */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #c19648;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Slightly larger & lighter on hover */
.nav-item.dropdown .nav-link:hover .user-avatar {
    background: #a37d33;
    transform: scale(1.05);
}

/* === COMPACT EXPANDABLE MEASUREMENTS STYLING === */
  .info-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
  }

  .info-item:last-child {
      border-bottom: none;
  }

  .info-label {
      font-weight: 600;
      color: #6c757d;
      font-size: 14px;
  }

  .info-value {
      font-weight: 500;
      color: #212529;
      font-size: 14px;
  }

  /* Compact Expandable Measurements */
  .measurement-compact-expandable {
      transition: all 0.3s ease;
  }

  .measurement-compact-expandable:hover .measurement-header {
      background: #e9ecef !important;
      transform: translateX(2px);
  }

  .measurement-compact-expandable.latest:hover .measurement-header {
      background: #f0e68c !important;
  }

  .measurement-header {
      transition: all 0.3s ease;
  }

  .latest-header {
      box-shadow: 0 2px 4px rgba(193, 150, 72, 0.2);
  }

  /* Responsive adjustments for compact measurements */
  @media (max-width: 1400px) {
      .measurement-details {
          padding: 8px 10px !important;
      }

      .measurement-details > div > div {
          grid-template-columns: 1fr !important;
          gap: 2px !important;
      }
  }

  @media (max-width: 1200px) {
      .measurement-header > div > div > span {
          font-size: 10px !important;
      }

      .measurement-details {
          font-size: 10px !important;
      }
  }

  /* === INDEPENDENT COLUMNS - NATURAL CONTENT HEIGHT === */
  .info-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
  }

  .info-item:last-child {
      border-bottom: none;
  }

  .info-label {
      font-weight: 600;
      color: #6c757d;
      font-size: 14px;
  }

  .info-value {
      font-weight: 500;
      color: #212529;
      font-size: 14px;
  }

  /* Compact Expandable Measurements - NO HEIGHT CONSTRAINTS */
  .measurement-compact-expandable {
      transition: all 0.3s ease;
      margin-bottom: 8px;
  }

  .measurement-compact-expandable:hover .measurement-header {
      background: #e9ecef !important;
      transform: translateX(2px);
  }

  .measurement-compact-expandable.latest:hover .measurement-header {
      background: #f0e68c !important;
  }

  .measurement-header {
      transition: all 0.3s ease;
  }

  .latest-header {
      box-shadow: 0 2px 4px rgba(193, 150, 72, 0.2);
  }

  /* Smooth transitions for measurement expansion */
  .measurement-details {
      transition: all 0.3s ease;
  }

  /* === DYNAMIC QUESTIONNAIRE STYLING === */
  .badge-container {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
  }

  .badge-container .badge {
      font-size: 11px;
      padding: 4px 8px;
  }

  /* Response value styling */
  .response-value {
      word-wrap: break-word;
      white-space: pre-line; /* Preserves line breaks for textarea content */
  }

  /* Badge styling for boolean values */
  .response-value .badge {
      font-size: 12px;
  }
 /* === SIMPLE QUESTIONNAIRE STYLING === */
  .questionnaire-responses {
      max-height: 850px;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 8px;
  }

  .response-item {
      padding-bottom: 12px;
      margin-bottom: 12px;
      border-bottom: 1px solid #f0f0f0;
      word-wrap: break-word;
      overflow-wrap: break-word;
  }

  .response-item:last-child {
      border-bottom: none;
      margin-bottom: 0;
  }

  .response-label {
      font-weight: 600;
      color: #c19648;
      font-size: 13px;
      margin-bottom: 4px;
      display: block;
  }

  .response-value {
      color: #6c757d;
      font-size: 14px;
      line-height: 1.4;
      margin-bottom: 0;
      word-wrap: break-word;
      overflow-wrap: break-word;
  }

  /* Badge container */
  .badge-container {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
  }

  .badge-container .badge {
      font-size: 11px;
      padding: 4px 8px;
  }

  /* Personal info styling */
  .info-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
  }

  .info-item:last-child {
      border-bottom: none;
  }

  .info-label {
      font-weight: 600;
      color: #c19648;
      font-size: 14px;
  }

  .info-value {
      font-weight: 500;
      color: #6c757d;
      font-size: 14px;
      text-align: right;
      max-width: 60%;
      word-wrap: break-word;
  }

  /* Card headers with gold accent */
  .card-header .card-title {
      color: #495057;
  }

  .card-header .card-title i {
      color: #c19648;
  }
  #next-menu-wrapper{
    width: 100%;
  }
  #next-menu{
    margin-left: 20px;
  }

  /* Bigger custom scrollbar */
  .questionnaire-responses::-webkit-scrollbar {
      width: 10px; /* Made bigger */
  }

  .questionnaire-responses::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 5px;
  }

  .questionnaire-responses::-webkit-scrollbar-thumb {
      background: #c19648;
      border-radius: 5px;
  }

  .questionnaire-responses::-webkit-scrollbar-thumb:hover {
      background: #a37d33;
  }

  /* Allergens and Foods sections */
  .allergens-foods-section {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 2px solid #f0f0f0;
  }

  .section-title {
      font-weight: 600;
      color: #c19648;
      font-size: 14px;
      margin-bottom: 8px;
      display: block;
  }
   /* Allergens and Foods Cards */
  .allergen-badge {
      background-color: #fff3cd !important;
      color: #856404 !important;
      border: 1px solid #ffeaa7 !important;
      margin-right: 8px !important;
      margin-bottom: 8px !important;
  }

  .nofood-badge {
      background-color: #f8d7da !important;
      color: #721c24 !important;
      border: 1px solid #f5c6cb !important;
      margin-right: 8px !important;
      margin-bottom: 8px !important;
  }

  .badge-container {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
  }
    @media (max-width: 576px) {
      .card-header .btn-sm {
          font-size: 0.7rem;
          padding: 0.2rem 0.4rem;
      }

      .card-header h5 {
          font-size: 1rem;
      }
  }
  

/* === 3D FLIP ANIMATION FOR MENU DETAILS === */
.menu-flip-container {
    perspective: 1200px;
    width: 100%;
    min-height: 400px;
    position: relative;
}

.menu-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.menu-flipper.flipped {
    transform: rotateY(180deg);
}

.menu-front, .menu-back {
    position: absolute;
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    top: 0;
    left: 0;
}

.menu-back {
    transform: rotateY(180deg);
}

/* Admin-style button styling for user dashboard */
.btn-custom-user {
    background-color: #ffffff;
    border: 1px solid var(--bs-primary-tint-80);
    color: #a67c30;
    transition: all 0.3s ease;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-custom-user:hover {
    background-color: #c19648;
    color: #ffffff;
    border-color: #c19648;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(193, 150, 72, 0.3);
}

.btn-custom-user:active {
    transform: translateY(0px);
}

.btn-custom-user:focus {
    box-shadow: 0 0 0 0.2rem rgba(193, 150, 72, 0.25);
}

.btn-custom-user .btn-inner {
    display: inline-flex;
    align-items: center;
}

.btn-custom-user svg {
    width: 16px;
    height: 16px;
}

/* Loading animation for flip */
.menu-flipper.loading {
    pointer-events: none;
}

.menu-flipper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #c19648;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* Recipe content styling for back side */
.recipe-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.recipe-section {
    margin-bottom: 30px;
}

.recipe-section h5 {
    color: #c19648;
    border-bottom: 2px solid #c19648;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.recipe-item {
    background: white;
    padding: 15px;
    border-left: 4px solid #c19648;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recipe-item .recipe-number {
    color: #c19648;
    font-weight: bold;
}

.substitution-section {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ffeaa7;
}

.substitution-section h4 {
    color: #856404;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #next-menu{
        margin-left: 10px;
    }
    .menu-flip-container {
        perspective: 800px;
        min-height: 300px;
    }

    .menu-flipper {
        transition: transform 0.6s ease;
    }

    .flip-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* === DATATABLES RESPONSIVE ENHANCEMENTS === */

/* Constrain table width so DataTables Responsive can detect overflow */
.dataTables_wrapper {
    width: 100%;
    max-width: 100%;
}

.card-body {
    overflow-x: auto;
}

table.dataTable {
    width: 100% !important;
    max-width: 100%;
}

/* Fix pagination layout - Remove double border */
.dataTables_wrapper .dataTables_paginate {
    text-align: right;
    padding-top: 0.5rem;
    --bs-pagination-border-width: 0px;
    --bs-pagination-active-bg: #c19648;
    --bs-pagination-active-border-color: #c19648;
}

.dataTables_wrapper .dataTables_paginate .page-link {
    border: none !important;
}

.dataTables_wrapper .dataTables_paginate .page-link:focus {
    background-color: #c19648 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    margin: 0 2px;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem;
    background: #fff !important;
    color: #495057 !important;
    cursor: pointer;
    transition: all 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
    padding: 0.375rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef !important;
    border-color: #c19648 !important;
    color: #c19648 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #c19648 !important;
    border-color: #c19648 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    cursor: not-allowed;
    opacity: 0.5;
    background: #fff !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

/* Info text styling */
.dataTables_wrapper .dataTables_info {
    padding-top: 0.5rem;
    color: #6c757d;
}

/* Responsive control icon styling (inline in first column) */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: #c19648;
    box-shadow: 0 2px 4px rgba(193, 150, 72, 0.3);
    transition: all 0.3s ease;
    margin-right: 8px;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    background-color: #a37d33;
    border-color: #a37d33;
}

/* Hidden row details styling */
table.dataTable.dtr-inline.collapsed > tbody > tr.child td {
    background-color: #f8f9fa;
    border-left: 4px solid #c19648;
    padding: 15px !important;
}

/* Child row content styling */
table.dataTable tbody tr.child ul.dtr-details {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

table.dataTable tbody tr.child ul.dtr-details > li {
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table.dataTable tbody tr.child ul.dtr-details > li:last-child {
    border-bottom: none;
}

/* Column labels in expanded rows */
table.dataTable tbody tr.child span.dtr-title {
    font-weight: 600;
    color: #c19648;
    min-width: 120px;
    display: inline-block;
}

/* Column values in expanded rows */
table.dataTable tbody tr.child span.dtr-data {
    color: #495057;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
    /* Reduce font sizes for all DataTables controls */
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        font-size: 0.75rem;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: left;
        margin-bottom: 8px;
    }

    /* Smaller search input */
    .dataTables_wrapper .dataTables_filter input {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        width: 120px !important;
    }

    /* Smaller show entries dropdown */
    .dataTables_wrapper .dataTables_length select {
        font-size: 0.75rem;
        padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 8px;
        font-size: 0.7rem;
    }

    /* Smaller pagination buttons */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.5rem !important;
        margin: 0 1px !important;
        font-size: 0.75rem !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button a {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Ensure table wrapper doesn't overflow */
    .table-responsive {
        overflow-x: hidden !important;
    }

    /* Make sure table fits within container */
    table.dataTable {
        width: 100% !important;
        max-width: 100%;
        font-size: 0.85rem;
    }

    /* Adjust card body padding on mobile */
    .card-body {
        padding: 0.5rem;
    }

    /* Control icon spacing on mobile */
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
    table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
        margin-right: 5px;
    }
}

/* Tablet optimizations */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Ensure tables are responsive on tablets too */
    .card-body {
        padding: 1rem;
    }

    table.dataTable {
        width: 100% !important;
    }
}

/* Better hover states for responsive rows */
table.dataTable.dtr-inline.collapsed > tbody > tr:hover > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr:hover > th.dtr-control:before {
    background-color: #a37d33;
    transform: scale(1.1);
}

/* Smooth transitions for child rows */
table.dataTable tbody tr.child {
    animation: fadeIn 0.3s ease;
}

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

/* Custom Info Button - Dark Yellow/Gold */
.btn.btn-info {
    color: var(--bs-white);
    background-color: #8a6a35 !important;
    border-color: #8a6a35 !important;
}

.btn.btn-info:hover {
    background-color: #ffffff !important;
    border-color: #c19648 !important;
    color: #a67c30 !important;
}

.btn.btn-info:focus,
.btn.btn-info:active {
    background-color: #6b4d1f !important;
    border-color: #6b4d1f !important;
    color: var(--bs-white) !important;
}

.pause-btn{
    background-color: #001F4D;
    color: white;
}