header { justify-items: center; }
body {
    font-family: Arial;
    background-color: #095f70;
    padding: 5px;
    color: #ffffff;
    font-size: 16px;
}

#dots {
  display: inline-block;
}

@keyframes bounceDot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

#dots span {
  display: inline-block;
  animation: bounceDot 0.6s infinite;
}
#styleInput, #prefixInput, #postfixInput, #sourceInput, #outCastInput, #vendorStyleInput{
    width: 100%;
    height: 30px;
    text-transform: uppercase;
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-btn { 
  padding: 10px 20px;
  background-color: #ff7f00;
  color: white;
  border: none;
  cursor: pointer;
}
.tab-btn.active {
  background-color: #0098ff;
}

.admin-btn {
    background-color: #0b0;
    margin: 5px;
}

.user-btn {
    background-color: #0bb;
}

.section-title {
  text-align: center;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: bold;
}
/* ---------- Stone criteria block (inline  CSS) ---------- */
.stone-crit{
  display:flex;
  flex-direction:row;
    justify-content: center;
}

/* Header row inside stone-crit (Add button + title) */
.stone-crit-header{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}

/* Stone crit section title spacing */
.stone-crit-title{ margin:8px 0; }

/* Each criteria row */
.stone-crit-row{
  display:flex;
  flex-wrap: wrap;
  gap:8px;
  align-items:center;
  margin:6px 0;
  padding:8px;
  border-radius:6px;
  border: 2px solid #ffffff;
}
.stone-crit-row select{
    color: #095f70;
}


/* ---------- Category criteria block (match stone-crit) ---------- */
.cat-crit{
  display:flex;
  flex-direction:row;
    justify-content: center;
}

.cat-crit-header{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}

.cat-crit-title{ margin:8px 0; }

.cat-crit-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin:6px 0;
  padding:8px;
  border-radius:6px;
  border: 2px solid #ffffff;
}
  .cat-crit-row select{
    color: #095f70;
  }


/* ---------- Datatables Responsive Table CSS---------- */

.custom-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;

}

.custom-toolbar .dataTables_length,
.custom-toolbar .dataTables_info,
.custom-toolbar .dataTables_filter,
.custom-toolbar .dataTables_paginate {
    margin: 0;
    white-space: nowrap;
}
/* Tile layout for Tile View */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 10px auto 0;
  max-width: 1200px;
}

.tile-card {
  background: #ffffff;
  color: #095f70;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tile-img-wrap {
  width: 100%;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
}

.tile-img-wrap img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
}

.tile-body {
  width: 100%;
  margin-top: 6px;
  text-align: center;
  font-size: 0.9rem;
}

.tile-style-link {
  color: #095f70;
  font-weight: 700;
  text-decoration: underline;
  display: inline-block;
  margin-bottom: 4px;
}

.tile-meta {
  font-size: 0.8rem;
  color: #555;
  margin-top: 2px;
}

.tile-price {
  margin-top: 4px;
  font-size: 0.8rem;
}

  #tableHelpText,
  #tileHelpText {
    display: none;
  }

/* reuse pills if you want inside tiles */
.tile-card .pill {
  margin-top: 4px;
}

.table-responsive {
    width: 50%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    place-self: center;
}
.table-responsive select, input[type="search"] {
    color: #ffffff;
}
.table-responsive option {
    color: #095f70;
}
/* Example widths — adjust to your content */
th:nth-child(1), td:nth-child(1) { width: 10%; }
th:nth-child(2), td:nth-child(2) { width: 10%; }
th:nth-child(3), td:nth-child(3) { width: 8%; }
th:nth-child(4), td:nth-child(4) { width: 8%; }
/*th:nth-child(5), td:nth-child(5) { width: 10%; }*/
/* Let the rest auto-adjust */

table {
    width: 100%;
    /*min-width: 600px;*/
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    color: #095f70;
    table-layout: fixed;  /* ensures column widths are respected */
    word-wrap: break-word; /* allows wrapping inside cells */
}
th, td {
    border: 1px solid #999;
    padding: 10px;
    text-align: center;
}
th {
    background-color: #66664d;
    color: white;
}
.image-preview {
    width: 150px;
    max-width: 100%;
    height: auto;
}

.sort-meta {
  font-size: 0.75em;
  font-weight: 400;
  color: #ffffff;
  margin-left: 4px;
  white-space: normal;
  word-break: break-word;
}


/* ===== FILTERS: base (desktop-first) ===== */
.filtercontainer {
  /* grid makes equal widths + clean wrapping */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
    justify-items: center;  /* center items in their columns */

    max-width: 1200px;  /* keeps it from stretching too wide */
    margin: 0 auto;     /* center the whole container */
}

.multiCriteriaContainer {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

.filtercontainer > div {
  display: flex;
  flex-direction: column;   /* label above control */
  width: 100%;
}

.filtercontainer label {
  font-weight: bold;
  margin-bottom: 6px;
  text-align: left;
}

.filtercontainer select,
.filtercontainer input[type="number"],
.filtercontainer input[type="date"] {
  font-size: 16px;
  padding: 6px 8px;
  background-color: #ffffff;
  color: #095f70;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Action buttons row: make it span full width nicely */
.actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1; /* span all columns */
}

.actions button {
  margin: 0; /* rely on gap */
  background-color: #aa00ff;
}


button {
    margin-right: 10px;
    background-color: #66664d;
    color: white;
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}
button:hover {
    background-color: #005f99;
}

.effy-logo {
    height: 60px;
    max-width: 100%;
}

/* Mobile phones (portrait and landscape, up to 600px) */
@media (max-width: 600px) {
    body {
        padding: 5px;
        font-size: 12px;
    }
    header, h1, h2, h3 {
        text-align: center;
	margin: 5px;
    }
    .effy-logo {
        height: 40px !important;
    }
/* ---------- Stone criteria block (inline  CSS) ---------- */
.stone-crit{
  display:flex;
  flex-direction:column;
    justify-content: center;
}

/* Header row inside stone-crit (Add button + title) */
.stone-crit-header{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}

/* Stone crit section title spacing */
.stone-crit-title{ margin:8px 0; }

/* Each criteria row */
.stone-crit-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin:6px 0;
  padding:8px;
  border-radius:6px;
  flex-wrap: wrap;
}

/* --- Category Critera Mobile CSS --- */

  .cat-crit{
    display:flex;
    flex-direction:column;
    justify-content: center;
  }
  .cat-crit-header{
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:space-between;
  }
  .cat-crit-title{ margin:8px 0; }
  .cat-crit-row{
    display:flex;
    gap:8px;
    align-items:center;
    margin:6px 0;
    padding:8px;
    border-radius:6px;
    flex-wrap: wrap; /* allow inputs to wrap like stone-crit */
  }
  .cat-crit-row select{
    max-width:225px;
  }

/* --- Datatables Responsive Table --- */
  .custom-toolbar {
    flex-direction: column;

  }
    .table-responsive {
        width: 100%;
        /*min-width: 0;*/
        /*overflow-x: hidden;*/
        margin: 0;
	place-self: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    }
    table {
        width: 100%;
        min-width: 0;
        font-size: 10px;
        table-layout: fixed;
    }
    th, td {
        padding: 2px 1px;
        font-size: 8px;
        text-align: -webkit-center;
    overflow: visible;      /* no clipping */
    text-overflow: clip;    /* no ellipsis */
    word-break: break-word; /* break long tokens if needed */
    overflow-wrap: anywhere;/* allow breaks anywhere as last resort */
    hyphens: auto;          /* optional: nicer hyphenation on supported devices */
    }

  /* Adjust widths to sum ~100% for all visible columns.
     If you have 5th/6th columns, uncomment/tune below. */

  th:nth-child(1), td:nth-child(1) { width: 36%; }  /* Image/thumbnail or small field */
  th:nth-child(2), td:nth-child(2) { width: 22%; }                   /* Style */
  th:nth-child(3), td:nth-child(3) { width: 13%; }                   /* Diamond Wt */
  th:nth-child(4), td:nth-child(4) { width: 16%; }                   /* Color Wt */
  th:nth-child(5), td:nth-child(5) { width: 18%; }                /* Price/Other */


    .image-preview {
        max-width: 100%; /*200px;*/
        width: auto;
        /*height: 48px;*/
        display: block;
        margin: 0 auto;
    }
  .filtercontainer {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        max-width: 90%;             /* smaller than screen */
        margin: 0 auto;
    gap: 10px;
  }
  .filtercontainer label {
    margin-bottom: 4px;
    font-size: 13px;
  }
  .filtercontainer select,
  .filtercontainer input[type="number"],
  .filtercontainer input[type="date"] {
    font-size: 14px;
    padding: 6px;
  }
  .filtercontainer .actions {
    justify-content: center; /* buttons centered on small screens */
    flex-wrap: wrap;
    gap: 6px;
  }
    button {
        
        margin-bottom: 1px;
    }

    input[type="text"] {
        margin-bottom: 10px;
        font-size: 16px;
        color: #095f70;
        
        box-sizing: border-box;
    }
    input[type="password"] {
        margin-bottom: 10px;
        font-size: 16px;
        color: #095f70;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablets (portrait and landscape, 601px to 900px) */
@media (min-width: 601px) and (max-width: 900px) {
    body {
        font-size: 16px;
        padding: 10px;
    }
    .effy-logo {
        height: 50px !important;
    }

   .filtercontainer {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
        max-width: 90%;
        margin: 0 auto;
  }
  .filtercontainer select,
  .filtercontainer input[type="number"],
  .filtercontainer input[type="date"] {
    font-size: 15px;
  }
    .table-responsive {
        width: 100%;
        /*min-width: 0;*/
        /*overflow-x: hidden;*/
        margin: 0;
	place-self: auto;
    }
    table {
        width: 100%;
        min-width: 0;
        font-size: 14px;
        table-layout: fixed;
    }
    th, td {
        padding: 8px 6px;
        font-size: 14px;
        text-align: -webkit-center;
    overflow: visible;      /* no clipping */
    text-overflow: clip;    /* no ellipsis */
    word-break: break-word; /* break long tokens if needed */
    overflow-wrap: anywhere;/* allow breaks anywhere as last resort */
    hyphens: auto;          /* optional: nicer hyphenation on supported devices */
    }

  /* Adjust widths to sum ~100% for all visible columns.
     If you have 5th/6th columns, uncomment/tune below. */

  th:nth-child(1), td:nth-child(1) { width: 20%; }  /* Image/thumbnail or small field */
  th:nth-child(2), td:nth-child(2) { width: 25%; }                   /* Style */
  th:nth-child(3), td:nth-child(3) { width: 13%; }                   /* Diamond Wt */
  th:nth-child(4), td:nth-child(4) { width: 13%; }                   /* Color Wt */
  th:nth-child(5), td:nth-child(5) { width: 30%; }                /* Price/Other */


    input[type="text"] {
        margin-bottom: 10px;
        font-size: 16px;
        color: #095f70;
        
        box-sizing: border-box;
    }
}

/* Desktop (901px and up) */
@media (min-width: 901px) {
    table {
        font-size: 16px;
        min-width: 700px;
    }
    th, td {
        padding: 12px 10px;
        font-size: 15px;
    }
  .filtercontainer {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
  }
    .table-responsive {
        width: 100%;
        /*min-width: 0;*/
        /*overflow-x: hidden;*/
        margin: 0;
	place-self: auto;
    }
    table {
        width: 75%;
        min-width: 0;
        font-size: 16px;
        table-layout: fixed;
    }
    th, td {
        padding: 10px 8px;
        font-size: 16px;
        text-align: -webkit-center;
    overflow: visible;      /* no clipping */
    text-overflow: clip;    /* no ellipsis */
    word-break: break-word; /* break long tokens if needed */
    overflow-wrap: anywhere;/* allow breaks anywhere as last resort */
    hyphens: auto;          /* optional: nicer hyphenation on supported devices */
    }

  /* Adjust widths to sum ~100% for all visible columns.
     If you have 5th/6th columns, uncomment/tune below. */

  th:nth-child(1), td:nth-child(1) { width: 20%; }  /* Image/thumbnail or small field */
  th:nth-child(2), td:nth-child(2) { width: 25%; }                   /* Style */
  th:nth-child(3), td:nth-child(3) { width: 13%; }                   /* Diamond Wt */
  th:nth-child(4), td:nth-child(4) { width: 13%; }                   /* Color Wt */
  th:nth-child(5), td:nth-child(5) { width: 30%; }                /* Price/Other */


}

