/* Modal Styling */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  z-index: 9999;
}

/* Modal Content */
.modal-content {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  max-width: 80vw;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
          box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Carousel */
.carousel {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* Carousel Images */
.carousel img {
  max-height: 600px;
  max-width: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  margin: auto;
}

/* Dots Container */
.carousel-dots {
  text-align: center;
  margin-top: 10px;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  -webkit-transition: background-color 0.3s ease, -webkit-transform 0.2s ease;
  transition: background-color 0.3s ease, -webkit-transform 0.2s ease;
  transition: background-color 0.3s ease, transform 0.2s ease;
  transition: background-color 0.3s ease, transform 0.2s ease, -webkit-transform 0.2s ease;
  cursor: pointer;
}

.dot.active {
  background-color: #333;
  -webkit-transform: scale(1.2);
          transform: scale(1.2); /* Make the active dot slightly larger */
}

.dot:hover {
  background-color: #777;
}

/* Close Button */
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  font-size: 20px;
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  padding: 8px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
  z-index: 20;
}

.close:hover,
.close:focus {
  background-color: #ff5555;
}

/* Carousel Control Buttons */
.carousel-control {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  z-index: 20;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

.carousel-control:hover {
  background-color: #555;
}







/* 🔹 PREVIEW SECTION: IMAGE & UDCR BUTTON */
.preview-section {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px; /* ✅ Reduced gap for tighter spacing */
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end; /* ✅ Aligns both elements to the right */
  -ms-flex-wrap: wrap;
      flex-wrap: wrap; /* ✅ Ensures responsiveness */
}

/* 🔹 IMAGE PREVIEW CONTAINER */
.issue-images {
  max-width: 120px;
  text-align: center;
  border-radius: 8px; /* ✅ Matches rounded card design */
  overflow: hidden;
}

/* 🔹 IMAGE STYLING */
.image-preview {
  position: relative;
  cursor: pointer;
  display: inline-block;
  border-radius: 8px; /* ✅ Rounded container */
  overflow: hidden; /* ✅ Prevents cropping issues */
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ✅ Subtle shadow */
}

.image-preview img {
  width: 100px;
  height: 100px;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 8px;
  -webkit-transition: -webkit-transform 0.2s ease-in-out;
  transition: -webkit-transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
}

.image-preview:hover img {
  -webkit-transform: scale(1.05);
          transform: scale(1.05); /* ✅ Smooth hover zoom effect */
}

/* 🔹 IMAGE COUNTER BADGE */
.image-counter {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #ff9800;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 12px;
}

.image-counter i {
  color: #ff9800;
  margin-right: 3px;
}

/* 🔹 UDCR PREVIEW BUTTON */
.preview-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px; /* ✅ Matches card styling */
  cursor: pointer;
  font-size: 14px;
  -webkit-transition: background 0.2s ease-in-out, -webkit-transform 0.1s ease-in-out;
  transition: background 0.2s ease-in-out, -webkit-transform 0.1s ease-in-out;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex; /* ✅ Ensures proper icon alignment */
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px; /* ✅ Adds space between icon & text */
  text-decoration: none; /* ✅ Removes link underline */
}

/* ✅ Ensure Icon is Properly Sized */
.preview-button i {
  font-size: 16px;
  color: white; /* ✅ Ensures icon is visible */
}

/* ✅ Hover Effect */
.preview-button:hover {
  background-color: #0056b3;
  -webkit-transform: scale(1.05);
          transform: scale(1.05); /* ✅ Slight pop effect */
}

/* 🔹 ISSUE CARD STRUCTURE */
.issue-card {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  border: 1px solid #ddd;
  padding: 0px;
  background: #fff;
  border-radius: 12px; /* ✅ Increased rounded corners */
  width: 100%; 
  margin: auto;
  overflow: hidden; /* ✅ Ensures nothing overflows the rounded corners */
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ✅ Optional shadow for depth */
}

/* 🔹 ISSUE HEADER */
.issue-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-color: #f8f9fa;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap; /* Prevents overflow */
  border-top-left-radius: 12px; /* ✅ Match rounded corners */
  border-top-right-radius: 12px;
}

/* Ensure Title & Badge Fit Inside Header */
.issue-header h5 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* 🔹 ISSUE IMAGES (Rounded Preview) */
.image-preview img {
  border-radius: 8px; /* ✅ Rounds image corners */
  -o-object-fit: cover;
     object-fit: cover;
}

/* 🔹 SECOND ROW - Layout Improvements */
.row.second-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 12px; /* Reduced gap to optimize space */
  max-height: 250px; /* ✅ Ensures row stays compact */
  padding: 8px; /* ✅ Reduces excess padding */
}

/* 🔹 Ensure Charts Stay Within Row Limits */
.second-row canvas {
  height: 100% !important;
  max-height: 250px !important; /* ✅ Chart height limit */
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1; /* ✅ Allows charts to stretch within their container */
}

/* 🔹 CARD SPACING & SIZING */
.second-row-card {
  margin-bottom: 6px; /* ✅ Slightly reduced margin */
  padding: 6px; /* ✅ Makes card more compact */
  border-radius: 1.25rem; /* ✅ Matches other cards */
}

/* 🔹 CHART CONTAINER - Controls Chart Sizing */
.chart-container {
  position: relative;
  height: 200px; /* ✅ Fix chart container height */
  width: 100%;
  overflow: hidden; /* ✅ Prevents overflow issues */
}

/* 🔹 GLOBAL CANVAS SETTINGS */
canvas {
  display: block;
  max-width: 100%; /* ✅ Ensures chart responsiveness */
}

.card-title {
  font-size: 0.9rem; /* Ensures all titles are the same size */
  margin-bottom: 0; /* Removes extra bottom margin */
  line-height: 1.2; /* Keeps consistent spacing */
}

.badge.total-badge {
  font-size: 0.85rem; /* Slightly smaller than title */
  padding: 0.25rem 0.6rem; /* Adjust padding to match title */
  line-height: 1.2;
  vertical-align: middle;
}
.rounded-custom {
  border-radius: 1.25rem !important;
}
.first-row .row {
  --bs-gutter-x: 0.25rem !important; /* Reduce horizontal spacing */
}
.first-row .col-md-3 {
  padding-right: 9px !important;
  padding-left: 9px !important;
}

/* ✅ Status Badge Styling */
.status-badge {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  min-width: 100px;
  text-align: center;
}

/* ✅ Softer Card Styling */
.card {
  border-radius: 12px;
  -webkit-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
          box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ Spacing for status rows */
.d-flex.justify-content-between {
  padding: 4px 0;
}

/* ✅ Ensures the card has a light shadow for better visibility */
.shadow-sm {
  -webkit-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
          box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

/* ✅ Ensures spacing inside the card */
.card-body {
  padding: 2px;
}

/* ✅ Badge Styling */
.total-badge {
    background-color: #0066cc;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-block;
    margin-left: 8px; /* ✅ Push badge slightly away from text */
    vertical-align: middle; /* ✅ Ensures correct alignment with table header */
}

/* ✅ Ensures table headers align properly */
th {
    white-space: nowrap;
    text-align: left;
}
/* 🔹 Ensure font size applies */
.custom-table {
  font-size: 12px; /* Ensures all text is smaller */
}

/* 🔹 Ensure font size applies to headers */
.custom-table thead th {
  font-size: 10px;
  font-weight: bold;
}

/* 🔹 Ensure font size applies to rows */
.custom-table tbody td {
  font-size: 9px;
}

/* 🔹 Override Bootstrap's Default Padding */
.custom-table th, 
.custom-table td {
  max-width: 150px; /* Adjust width as needed */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.1rem 0.2rem !important; /* Forces padding override */
}



/* Fix for Source Badge */
.source-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 5px;
  font-weight: bold;
  white-space: nowrap; /* Prevents text wrapping */
  margin-right: 8px;
  max-width: 100%;
}

.source-badge.kargotools {
  background-color: #e74c3c;
  color: white;
}

.source-badge.cotalker {
  background-color: #2ecc71;
  color: white;
}



/* Status Badge */
.status-badge {
  background: #007bff;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
}

/* 🔹 ISSUE BODY (Two Columns) */
.issue-body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 20px;
  padding: 0px 15px 15px 15px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

/* Left Column */
.left-column {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  text-align: left;
  min-width: 250px;
}

/* Right Column (Aligned to the Right) */
.right-column {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: end;
      -ms-flex-align: end;
          align-items: flex-end; /* Aligns all content to the right */
  text-align: right;
  min-width: 250px;
}

/* 🔹 DATE STYLES */
.left-column p,
.right-column p {
  margin: 5px 0;
  font-size: 14px;
}

/* 🔹 RESPONSIVE DESIGN */
@media (max-width: 600px) {
  .issue-body {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }

  .left-column,
  .right-column {
    width: 100%;
  }

  .preview-section {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }

  .row.second-row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    max-height: unset;
  }

  .second-row canvas {
    width: 100%;
    height: auto !important;
    max-height: unset !important;
  }
}
