/**
 * Module: /public/css/quotes.css
 * Updated: 2025-10-09
 * Batch #2 — “The most dangerous phrase in the language is, ‘We’ve always done it this way.’” — Grace Hopper
 * © Steam Factory — Built with ❤️ by the awesome crew at Steam Factory
 * chatGPT says, "and I helped!"
 *
 * Purpose:
 *   Styling for the Quotes view inside the Steam Factory Portal.
 *   Clean brass-accented grid with full-width table layout.
 */



/* ----------------------------------------------------------
   Steam Factory Portal — Quotes View
   ---------------------------------------------------------- */

.sf-quotes {
  font-family: "Zilla Slab", "Segoe UI", sans-serif;
}

.sf-quotes h1 {
  margin-top: 0;
  font-weight: 600;
  /* border-bottom: 3px solid #ffcc00; */
  padding-bottom: 0.5rem;
}


/* ==========================================================
   🔒 QUOTES TAB — Scoped Buttons (Always Override)
   ========================================================== */
   

/* ==========================================================
   🚫 SCOPED OVERRIDES FOR QUOTES TAB BUTTONS
   Ensures View, Order, Edit all match perfectly
   ========================================================== */

.sfv-quotes .qbtn,
.sfv-quotes .qbtn-view,
.sfv-quotes .qbtn-order,
.sfv-quotes .qbtn-edit,
.sfp-table .qbtn-build,
.sfp-table .qbtn-view,
.sfp-table .qbtn-send{
  all: unset;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.40rem 0.80rem;   /* IDENTICAL height */
  font-size: 0.92rem;         /* IDENTICAL text size */
  line-height: 1;             /* IDENTICAL vertical baseline */

  background: #eee;
  color: #000;
  border-radius: 6px;
  border: 1px solid #ccc;

  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;

  box-shadow: none !important;
  height: 1.25rem;
  width: 7rem;
}

/* Hover */
.sfv-quotes .qbtn:hover {
  background: #ddd;
}

/* Order (green) */
.sfv-quotes .qbtn-order {
  background: #28a745;
  border-color: #1e7e34;
  color: #fff;
}
.sfv-quotes .qbtn-order:hover {
  background: #218838;
}

/* View (gray) */
.sfv-quotes .qbtn-view {
  background: #ccc;
  border-color: #bbb;
}
.sfv-quotes .qbtn-view:hover {
  background: #bbb;
}

/* Edit (blue — but matching HEIGHT) */
.sfv-quotes .qbtn-edit {
  background: #0b63c9;
  border-style: solid;
  color: #fff;
}
.sfv-quotes .qbtn-edit:hover {
  background: #094a96;
}

.sfp-table .qbtn-build {
  background: #ffcc00;
  color: #000;
}
.sfp-table .qbtn-build:hover { background: #fff000; }

.sfp-table .qbtn-view {
  background: #ccc;
  border-color: #bbb;
}
.sfp-table .qbtn-view:hover {
  background: #bbb;
}


.sfp-table .qbtn-send {
  background: #28a745;
  color: #fff;
}
.sfp-table .qbtn-send:hover {
  background: #bbb;
}
/* ----------------------------------------------------------
   Table Layout — Full-Width Gridlines
---------------------------------------------------------- */

.sf-table-quotes {
  width: 100%;
  border-collapse: collapse;           /* removes cell spacing */
  table-layout: fixed;                 /* keeps columns aligned */
  background: #fff;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* uniform cell gridlines */
.sf-table-quotes th,
.sf-table-quotes td {
  border: 1px solid #bfbfbf;           /* subtle brass-gray grid */
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: middle;
  word-wrap: break-word;
}

/* header style */
.sf-table-quotes th {
  border: 1px solid #999;           /* darker line for visibility */
  border-left: 1px solid #999;
  border-right: 1px solid #999;
}

/* alternating row color for readability */
.sf-table-quotes tbody tr:nth-child(even) {
  background: #f5f5f5;
}

/* hover highlight */
.sf-table-quotes tbody tr:hover {
  background: #fff8dc;                 /* light brass tint */
}

/* make the table fill container height visually */
.sf-quotes {
  margin: 0;
  padding: 0;
}

.sf-quotes table {
  width: 100%;
}

/* buttons stay tidy inside cells */
.sf-btn {
  background: #ffcc00;
  color: #000;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sf-btn:hover { background: #fff000; }

.sf-btn-alt {
  background: #ccc;
}

.sf-btn-alt:hover {
  background: #bbb;
}

.sf-btn-small {
  font-size: 0.8rem;
}

/* ====================================================================
   Dedicated style for the Quotes → Order button
   Prevents style collisions when core.css reloads in other tabs
   ==================================================================== */

.sfp-quotes-order-btn {
  background: #28a745 !important;   /* green */
  color: #fff !important;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.sfp-quotes-order-btn:hover {
  background: #218838 !important;
}




/* ----------------------------------------------------------
   Brass Gridline Reinforcement — Steam Factory Portal
---------------------------------------------------------- */

.sf-quotes table.sf-table-quotes th,
.sf-quotes table.sf-table-quotes td {
  border: 1px solid #888 !important;   /* darker visible gridlines */
  border-collapse: collapse !important;
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: middle;
}

/* Stronger header accent */
.sf-quotes table.sf-table-quotes thead th {
  background: #1a1a1a !important;
  color: #ffcc00 !important;
  border-bottom: 3px solid #ffcc00 !important; 
}

/* Stripe pattern for contrast */
.sf-quotes table.sf-table-quotes tbody tr:nth-child(even) {
  background: #f7f7f7 !important;
}


/* ----------------------------------------------------------
   Quotes header and button styling
---------------------------------------------------------- */
.sf-quotes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #ffcc00; 
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem 0.25rem;
  background: #fdfdfd;
}

.sf-btn-new {
  background: #ffcc00;
  color: #111;
  border: none;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, transform 0.1s ease;
}

.sf-btn-new:hover {
  background: #fff000;
  transform: translateY(-1px);
}

.sf-quote-create {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
}

.sf-quote-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.sf-form-group {
  display: flex;
  flex-direction: column;
}

.sf-form-group input[type="text"],
.sf-form-group input[type="file"],
.sf-form-group select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.sf-form-group label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.file-upload small {
  font-size: 0.8rem;
  color: #777;
}

.sf-quote-header .sf-form-group input[type="text"],
.sf-quote-header .sf-form-group input[type="file"] {
  background: #fafafa;
}
.sf-quote-create h2 {
  margin-top: 1rem;
}

.sfp-btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.sfp-btn-loading::after {
  content: "";
  position: absolute;
  right: -25px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-right-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

