/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.body-wrapper.loading [data-i18n] {
  visibility: hidden; /* Hide untranslated content */
}

.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
}

.app-brand-logo.demo svg {
  width: 38px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  margin-left: 0.5rem;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 74px !important;
}
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.docs-page .layout-navbar-fixed.layout-wrapper:not(.layout-without-menu) .layout-page,
.docs-page .layout-menu-fixed.layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 62px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 231px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}
.no-cursor {
    cursor: default; /* Sets the cursor to the default arrow */
}

/*
* Manage
******************************************************************************/

.body-wrapper {
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

.body-wrapper.loaded {
    opacity: 1;
    transition: opacity 0.1s ease-in-out;
}

.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
/*    margin-top: -20px;
    margin-left: -20px;*/
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

.spinner.visible {
    opacity: 1;
    transition: opacity 0.1s ease-in-out;
}

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

/* Add to your custom CSS (e.g., demo.css or app-notifications.css) */
.badge-notifications {
    min-width: 20px !important; /* Prevent trimming for single digit */
    font-size: 0.75em !important; /* Smaller font for multi-digit fit */
    line-height: 1 !important;
    padding: 0.25em 0.4em !important; /* Adjust padding for rounded-pill */
}

@media (max-width: 768px) {
    .badge-notifications {
        min-width: 18px !important;
        font-size: 0.7em !important;
    }
}
/* Reduce cell padding in DataTables for a tighter look */
.datatables-basic table.dataTable td,
.datatables-basic table.dataTable th {
    padding: 0.5rem 0.75rem !important; /* Default is usually 0.75rem 1rem */
}

/* Optional: Even tighter for very dense tables */
.datatables-basic table.dataTable.compact td,
.datatables-basic table.dataTable.compact th {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.925rem;
}

/* Optional: Reduce row height slightly */
.datatables-basic table.dataTable tbody tr td {
    height: 40px;
}

.app-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
  /* Match Bootstrap’s offcanvas backdrop timing if desired (default: 0.3s) */
}

.app-overlay.show {
  opacity: 0.5; /* or whatever opacity you prefer */
  visibility: visible;
}

.no-hover-effect {
    cursor: default;
    pointer-events: none; /* makes it truly non-interactive */
}

.no-hover-effect:hover,
.no-hover-effect:focus,
.no-hover-effect:active,
.no-hover-effect.active {  /* covers cases where .active class is added */
    background-color: transparent !important;
    background-image: none !important;
    color: inherit !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* =============================================
   RESPONSIVE TABLES - Shorter default, auto-elongate on long content
   ============================================= */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Base table */
#serviceTable,
#providerTable,
.shop-hours-table {
    width: 100%;
    min-width: 580px;                   /* still triggers scroll on mobile */
    table-layout: auto;
}

#serviceTable th, #serviceTable td,
#providerTable th, #providerTable td,
.shop-hours-table th, .shop-hours-table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* === Services Table ===================================== */
#serviceTable {
    min-width: 580px;
}

#serviceTable th:nth-child(1),
#serviceTable td:nth-child(1) {         /* Service Name - starts narrow, grows when needed */
    min-width: 140px;
    max-width: 45%;                     /* ← allows growing a lot if name is very long */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

#serviceTable th:nth-child(2), #serviceTable td:nth-child(2) {  /* Price */
    min-width: 100px;
    text-align: right;
}

#serviceTable th:nth-child(3), #serviceTable td:nth-child(3) {  /* Duration */
    min-width: 110px;
    text-align: center;
}

#serviceTable th:nth-child(4), #serviceTable td:nth-child(4) {  /* Delete */
    min-width: 90px;
    text-align: center;
}

/* === Providers Table ==================================== */
#providerTable {
    min-width: 620px;
}

#providerTable th:nth-child(1),
#providerTable td:nth-child(1) {        /* Provider Name */
    width: 130px;                       /* ← compact default */
    min-width: 130px;
    max-width: 30%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

#providerTable th:nth-child(2),
#providerTable td:nth-child(2) {        /* Services list - most flexible column */
    width: 160px;                       /* ← starts shorter */
    min-width: 160px;
    max-width: 45%;                     /* ← can grow significantly when many services */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

#providerTable th:nth-child(3), #providerTable td:nth-child(3) {  /* Email */
    width: 160px;
    min-width: 140px;
    max-width: 30%;
}

#providerTable th:nth-child(4), #providerTable td:nth-child(4) {  /* Contact */
    width: 130px;
}

#providerTable th:nth-child(5), #providerTable td:nth-child(5) {  /* Delete */
    width: 90px;
    text-align: center;
}

/* === Shop Operating Hours ================================= */
.shop-hours-table {
    min-width: 540px;
}

.shop-hours-table th:nth-child(1), .shop-hours-table td:nth-child(1) {  /* Weekday */
    width: 120px;
}

.shop-hours-table th:nth-child(2), .shop-hours-table td:nth-child(2) {  /* Open */
    width: 70px;
    text-align: center;
}

.shop-hours-table th:nth-child(3), .shop-hours-table td:nth-child(3) {  /* Start */
    width: 140px;
}

.shop-hours-table th:nth-child(4), .shop-hours-table td:nth-child(4) {  /* End */
    width: 140px;
}

/* Prevent text from overflowing without wrapping */
#serviceTable td, #providerTable td {
    overflow: hidden;
    text-overflow: ellipsis;          /* fallback when wrapping isn't enough */
}

/* Align headers left only for our setup tables */
#serviceTable th,
#providerTable th,
.shop-hours-table th {
    text-align: left;
}

/* Restore right/center alignment only where it makes sense */
#serviceTable th:nth-child(2),
#serviceTable td:nth-child(2) {      /* Price */
    text-align: left;
}

#serviceTable th:nth-child(3),
#serviceTable td:nth-child(3) {      /* Duration */
    text-align: left;
}

#serviceTable th:nth-child(4),
#serviceTable td:nth-child(4) {      /* Delete button */
    text-align: left;
}

#providerTable th:nth-child(5),
#providerTable td:nth-child(5) {     /* Delete button */
    text-align: left;
}

.shop-hours-table th:nth-child(2),
.shop-hours-table td:nth-child(2) {  /* Checkbox */
    text-align: left;
}

.invalid-feedback {
    display: block !important;
    color: #dc3545 !important;
}

.time-disabled {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}