/*
Theme Name: rawrkee
Theme URI: 
Author: 
Author URI: 
Description: custom template for rawrkee
Version: 1.0
License: GNU GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rawrkee
Tags: bootstrap, responsive, custom, magazine, sidebar
*/
:root {
  --primary: #222;
  --secondary: #d10909;
}

/* BS Toast */

/* Default: XS screens — bottom with margin */
#saveToastContainer,
#mobile-toast {
  bottom: 50px !important; /* XS bottom margin */
}

/* Carousel Indicators - Edit/Single Car */

.carousel-indicators button {
  background-color: #999 !important;
  /* Bootstrap's dark bg */
  width: 10px;
  height: 4px !important;
  transition: opacity 0.3s;
}

.carousel-indicators button.active {
  opacity: 1;
  background-color: #000 !important;
  /* solid dark */
}

.carousel-item {
  transition: transform 0.3s ease-in-out;
  /* was 0.6s */
}

/* responsive font size */

@media (max-width: 575.98px) {
  .font-sm {
    font-size: 0.875rem !important;
  }
  .font-xs {
    font-size: 0.75rem !important;
  }
}

/* Theme Colors */
.card,
.btn-outline-secondary {
  border-color: #e8e8e8;
}
.btn-outline-secondary {
  --bs-btn-color: #333;
}

.bg-dark {
  background-color: #212121 !important;
}

/* basic css */

body {
  color: #333;
  background-color: #fafafa;
}
a {
  color: var(--primary);
  text-decoration: unset;
}
a:hover {
  color: var(--secondary);
}

.btn {
  font-size: 1rem;
  line-height: 24px;
}

/* Magazine grid cards */
.magazine-grid .card {
  border: none;
  transition: transform 0.2s;
}
.magazine-grid .card:hover {
  transform: translateY(-5px);
}

.section-title {
  text-transform: lowercase;
  font-weight: bold;
  font-size: 1rem;
}

/* Add more custom styles below */

.object-fit-cover {
  object-fit: cover;
}

/* Small screens overwrite */

@media (max-width: 576px) {
  /* Slightly smaller heading */
  .card-body .card-title {
    font-size: 1rem; /* adjust as needed */
    line-height: 1.2;
  }

  /* A bit tighter excerpt text */
  .card-body .card-text {
    font-size: 0.875rem; /* ~14px */
  }
}

#footer {
  padding: 20px 0 !important; /* reduced on SM+ */
}

/* SM and up: move to top-right below navbar */

@media (min-width: 576px) {
  #saveToastContainer,
  #mobile-toast {
    top: 62px; /* adjust based on your navbar height */
    bottom: auto; /* override default */
    right: 0.9rem;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 0px; /* height of your sticky bottom nav */
  }
  #footer {
    padding: 20px 0 80px 0 !important; /* reduced on SM+ */
  }
}

/* Car Part Table */

#singleCarTable {
  border-top: 0;
}

#singleCarTable .scroll-tabs-wrapper {
  background: #fff;
  padding: 10px 5px;
}

#singleCarTable table {
  margin: 0 !important;
}

#singleCarTable .table-singleCar > thead {
  border-top: thin solid #bbb;
}

#singleCarTable .table-singleCar th {
  background: #fff;
}

/* Stripe .table-singleCar rows even without .table-striped */
#singleCarTable .table-singleCar > tbody > tr:nth-of-type(odd) > th,
#singleCarTable .table-singleCar > tbody > tr:nth-of-type(odd) > td {
  background-color: #f6f7f7 !important;
}

/* (Optional) Reset the even rows if needed */
#singleCarTable .table-singleCar > tbody > tr:nth-of-type(even) > th,
#singleCarTable .table-singleCar > tbody > tr:nth-of-type(even) > td {
  background-color: #ffffff !important;
}

/* Remove bottom border on the very last row */
#singleCarTable .table-singleCar > tbody > tr:last-child > th,
#singleCarTable .table-singleCar > tbody > tr:last-child > td {
  border-bottom: none !important;
}

.nav-pills {
  padding: 5px;
  background: #eee;
}

#singleCarTable .nav-pills .nav-link.active,
#partsTabContent .nav-pills .nav-link.active {
  background-color: #000;
  color: #fff;
}

#singleCarTable .nav-pills .nav-link,
#partsTabContent .nav-pills .nav-link {
  color: #000;
  background-color: #eee;
  padding: 4px 10px;
  margin: 5px 2px;
  border: 0;
  border-radius: 8px;
  font-weight: 500;
}

/* 1) Wrap your <ul> so it can scroll */
#singleCarTable .nav-pills,
#partsTabContent .nav-pills {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* smooth swipe on iOS */
}

/* 2) Make the UL a no-wrap flex row */
#singleCarTable .nav-tabs,
#singleCarTable .nav-pills,
#partsTabContent .nav-tabs,
#partsTabContent .nav-pills {
  display: flex;
  flex-wrap: nowrap;
  /* never wrap to next line */
  white-space: nowrap;
  /* guard against text wrapping */
}

/* 3) Prevent each LI from flexing or shrinking */
#singleCarTable .nav-tabs .nav-item,
#singleCarTable .nav-pills .nav-item {
  flex: 0 0 auto;
  /* width dictated by its content */
}

/* 4) (Optional) hide scrollbar but keep swipe */
#singleCarTable,
#singleCarTable .nav-pills {
  scrollbar-width: none;
  /* Firefox */
}

#singleCarTable::-webkit-scrollbar,
#singleCarTable .nav-pills::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

/*------------------------------------*/
/*  Page - user edit car */
/*------------------------------------*/
textarea#car-parts-input {
  height: revert;
  margin-bottom: 0;
}

/* textarea line count */

.editor-wrapper {
  display: flex;
  border: 1px solid #ced4da;
  border-radius: 4px;
  overflow: hidden;
  align-items: flex-start;
}

.editor-wrapper pre {
  margin-bottom: 0;
}

/*------------------------------------*/
/* userEditCar - Add Car Parts Modal */
/*------------------------------------*/
.editor-wrapper {
  position: relative;
  display: flex;
  font-family: monospace;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

/* Line numbers gutter */
#line-numbers {
  counter-reset: line;
  padding: 12px 8px;
  background: #f1f1f1;
  color: #666;
  text-align: right;
  user-select: none;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  /* perfectly hide scrollbar */
  overflow: hidden;
}

/* Each line gets its own counter */
#line-numbers span {
  display: block;
  counter-increment: line;
}
#line-numbers span::before {
  content: counter(line);
  display: inline-block;
  width: 2ch;
  margin-right: 0.5em;
  color: #999;
}

/* Textarea next to it */
#car-parts-input {
  flex: 1;
  padding: 12px 8px;
  border: none;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  background: transparent;
  /* sync height and scroll */
  height: auto;
  overflow: auto;
}

/* Hide scrollbar in all browsers */
#car-parts-input::-webkit-scrollbar,
#car-parts-input::-webkit-scrollbar-track,
#line-numbers::-webkit-scrollbar {
  display: none;
}
#car-parts-input,
#line-numbers {
  -ms-overflow-style: none; /* IE11 */
  scrollbar-width: none; /* Firefox */
}

#partsAccordionBody .nav-link {
  font-size: 14px;
}

#partsAccordionBody .nav-link:hover {
  cursor: pointer;
}

/* Bootstrap-friendly styles for mobile optimization */
.car-edit-section {
  font-size: 12px;
}

.accordion-button {
  padding: 6px 10px !important;
  font-size: 12px;
}

#partsAccordionBody .accordion-body {
  padding: 0;
}

.input-effect {
  position: relative;
}

.input-effect .form-control {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: thin solid #ddd !important;
  box-shadow: none;
}

.input-effect .form-control:focus {
  /* removes bootstrap blue border/glow */
  box-shadow: none;
  outline: 0 none;
  border-color: #ddd;
}

.effect-16 {
  border: 0 !important;
  padding: 4px 0;
  border-bottom: 1px solid #ccc;
  background-color: transparent;
  width: 100%;
  font-size: 14px;
  outline: none;
  position: relative;
  z-index: 2;
}

/* Label default */
.effect-16 ~ label {
  position: absolute;
  line-height: 1.2;
  left: 10px;
  top: 7px;
  color: #aaa;
  transition: 0.3s;
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.5px;
  opacity: 1;
  font-size: 14px;
}

/* Float label when focused */
.effect-16:focus ~ label {
  top: -14px;
  font-size: 12px;
  color: #4caf50;
  opacity: 1;
}

/* Hide label when has value and not focused */
.has-content.effect-16:not(:focus) ~ label {
  opacity: 0;
}

/* Green animated border */
.effect-16 ~ .focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #4caf50;
  transition: 0.4s;
  z-index: 2;
}

/* ✅ SHOW green border whenever focused */
.effect-16:focus ~ .focus-border {
  width: 100%;
}

/* fade-in add car part input */

tr.fade-in {
  animation: fadeInRow 0.5s ease-in-out;
}

@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* fade-out when deleting car part input */

tr.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

#parsed-results .accordion-item .nav-tabs,
#singleCarTable .nav-tabs {
  padding: 10px;
}

#parsed-results .accordion-item .nav-tabs .nav-link,
#singleCarTable .nav-link {
  color: #000;
  background-color: #fefefe;
  padding: 4px 10px;
  margin: 5px 2px;
  border: 0;
  border-radius: 8px;
  font-weight: 500;
}

#parsed-results .accordion-item .nav-tabs .nav-link.active,
#singleCarTable .nav-link.active {
  background-color: #000;
  color: #fff;
}

/* 1) Make the wrapper always scrollable */
.scroll-tabs-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* 2) Force your <ul> to stay on one line and be as wide as its contents */
.scroll-tabs-wrapper .nav-tabs {
  display: inline-flex; /* shrink‐to‐fit its children */
  flex-wrap: nowrap !important; /* never wrap onto a new line */
  min-width: max-content; /* wide enough for all <li> */
}

/* 3) Prevent individual tabs from wrapping their text */
.scroll-tabs-wrapper .nav-tabs .nav-item {
  white-space: nowrap;
}

/* nav tabs scroll */
.scroll-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

.scroll-tabs-wrapper::-webkit-scrollbar {
  display: none;
  /* Safari + Chrome */
}

.nav-tabs {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.cpitem {
  list-style-type: none;
}
.cpitem li {
}

/* Table CSS */

.car-admin-table input[type="text"],
.car-admin-table select {
  font-size: inherit;
}

.car-admin-table input[type="text"] {
  background-color: rgb(242, 242, 242);
  border: thin solid rgb(222, 226, 230);
  border-radius: 6px;
  box-shadow: none;
}

.car-admin-table {
  width: 100%;
  font-size: 1rem;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: #fff;
}

.car-admin-table th,
.car-admin-table td {
  padding: 8px;
  border-bottom: 1px solid #ccd0d4;
  text-align: left;
  vertical-align: middle;
}

.car-admin-table th {
  background-color: rgb(248, 249, 250);
  font-weight: 700;
  color: #222;
}

.car-admin-table tbody tr {
  background-color: #f2f2f2;
  border-bottom: thin solid #dee2e6;
}

.car-admin-table tbody tr:nth-child(odd) {
  background-color: #e6e6e6;
}

.car-admin-table tbody tr:hover {
  background-color: #e0e0e0;
}

/* Optional: icon button style */
.car-admin-table .btn {
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 4px;
}

.car-admin-table .btn-outline-secondary {
  border: 1px solid #6c757d;
  color: #6c757d;
}

.car-admin-table .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
}

.car-admin-table .btn-outline-danger {
  border: 1px solid #dc3545;
  color: #dc3545;
  background: none;
}

.car-admin-table .btn-outline-danger:hover {
  background-color: #f8d7da;
  color: #a71d2a;
}

/* Recreate WordPress admin button styles using Bootstrap structure */
.btn-sm {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 3px;
  line-height: 1.5;
}

/* Edit button (gray) */
.btn-secondary {
  border: 1px solid rgb(108, 117, 125);
  background-color: rgb(108, 117, 125);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #5c636a;
  color: #fff;
}

.edit-fix {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Save button (green) */
.btn-success {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
}

.btn-success:hover {
  background-color: #157347;
}

/* Cancel button (light gray) */
.btn-outline-secondary {
  background-color: transparent;
  color: #555;
  border-color: #ccc;
}

.btn-outline-secondary:hover {
  color: #111;
}

/* Delete button (red) */
.btn-danger {
  background-color: #dc3546;
  border-color: #dc3546;
  color: #fff;
}

.btn-danger:hover {
  background-color: #a00;
}

/* Bootstrap modal mod */
.modal.modal-bottom .modal-dialog {
  position: fixed;
  bottom: 0;
  margin: 0;
  width: 95% !important;
  margin: 0 auto 15px auto !important;
  border-radius: 8px !important;
  max-width: 100%;
  transition: transform 0.4s ease-out;

  /* aligns horizontally */
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.modal.modal-bottom.show .modal-dialog {
  transform: translateY(0);
}

.modal.modal-bottom .modal-content {
  border-radius: 8px !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

/* Medium screens (tablet) */
@media (max-width: 991.98px) {
  .car-admin-table {
    font-size: 0.95rem;
    /* ~15px */
  }

  .car-admin-table .btn {
    font-size: 13px;
  }
}

/* Small screens (phones) */
@media (max-width: 767.98px) {
  .car-admin-table {
    font-size: 0.875rem;
    /* 14px */
  }

  .car-admin-table .btn {
    font-size: 12px;
  }

  .car-admin-table th,
  .car-admin-table td {
    padding: 6px;
  }

  td .btn {
    flex-direction: column;
    width: 100%;
  }
}

/* Extra small screens */
@media (max-width: 575.98px) {
  .car-admin-table {
    font-size: 0.7rem;
    /* 12px */
  }

  .car-admin-table .btn {
    font-size: 11px;
    padding: 3px 6px;
  }
}

@media (max-width: 576px) {
  .nav-tabs > li > a {
    /* fix tabs on smaller screens */
    padding: 6px 10px;
  }

  .effect-16 ~ label {
    left: 8px;
    top: 1px;
    font-size: 12px;
  }

  /* Float label when focused */
  .effect-16:focus ~ label {
    top: -14px;
    font-size: 11px;
  }
}

#crop-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
}

#crop-thumbnails img.selected {
  box-shadow:
    rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  /* Bootstrap primary blue */
}

/* single-car & edit-car */
/* ensure the indicators are positioned above the slides */
#carousel-counter {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
  pointer-events: auto;
  /* allow clicks when visible */
}

/* when hidden, fade out and disable clicks */
#carousel-counter.carousel-hidden {
  opacity: 0;
  pointer-events: none;
}

/* remove bottom margin on paragraphs in your comment-content block */
.comment-content p {
  margin-bottom: 0;
}

.cmt-btns button i {
  font-size: 1rem !important;
}

.cmt-reply img {
  width: 30px !important;
  height: 30px !important;
}
.like-btn.liked i.bi-hand-thumbs-up {
  color: #0d6efd; /* Bootstrap primary blue */
}

.toast-body a {
  font-weight: bold;
  color: #fff;
}
