/* style.css - for both index.html and history.html */

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 20px 20px; /* ✅ Only inner content padded, not top */
  margin-bottom: 60px;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  margin: 0; /* ✅ kill default spacing */
  padding: 0;
}


.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  justify-content: center; /* ✅ Center the grid */
  max-width: 900px;        /* ✅ Prevent it from going too wide */
  margin: 0 auto;           /* ✅ Center horizontally */
}


.site-card {
  background-color: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  text-align: center;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.site-card:hover {
  transform: scale(1.03);
}

.site-card h2 {
  font-size: .9rem;
  margin-bottom: 5px;
}

.site-card .quote-count {
  font-size: 1.0rem;
  font-weight: bold;
  color: #28a745;
  margin: 5px 0;
}

.quote-count {
  font-size: 1.1rem;
  margin: 5px 0;
}

.quote-number {
  font-weight: bold;
  color: #28a745; /* ✅ green */
  margin-right: 4px;
}

.quote-label {
  color: #000;  
  font-size: .8rem
}


.site-card .history-link {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.8rem;
  color: #0077cc;
  text-decoration: none;
}

.site-card .history-link:hover {
  text-decoration: underline;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.site-name {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.quote-count {
    font-size: 2.5em;
    color: #007bff;
    margin: 20px 0;
}

.history-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.history-button:hover {
    background: #0056b3;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 0 auto 40px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background: #007bff;
    color: white;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

a.back-button {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

a.back-button:hover {
    background: #0056b3;
}


.site-logo {
  width: 150px;
  height: 49px;
  object-fit: contain;
  margin-bottom: 5px;
  border-radius: 8px;
}


#loading-screen {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-family: sans-serif;
  color: #333;
  transition: opacity 0.3s ease;
}

body.loaded #loading-screen {
  opacity: 0;
  pointer-events: none;
}





.dashboard-header h1 {
  font-size: 1.4rem;
  margin: 0;
  flex-grow: 1;
  min-width: 200px;
}

.filter-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  justify-content: center;
}

.filter-form select {
  padding: 2px 6px;
  font-size: 0.9rem;
}

.filter-form .small-btn {
  padding: 4px 8px;
  font-size: 0.9rem;
}



.header-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}


/* Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--header-bg, #f0f0f0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
  box-sizing: border-box;
  margin-bottom: 40px;
}

.header-left,
.header-center,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-center {
  justify-content: center;
  gap: 10px;
}

.header-right {
  justify-content: flex-end;
}

.header-left h1 {
  margin: 0;
  font-size: 1.4rem;
}

.header-title {
  margin: 0;
  font-size: 1.2rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  color: #333;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.4);
  z-index: 10;
}

.dropdown-content a {
  color: black;
  padding: 10px 14px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f0f0f0;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

.category-buttons button {
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

.category-buttons button.active {
    background-color: #444;
    color: #fff;
    border-color: #444;
}

.check-quotes-button button {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 10px 20px;
    text-decoration: none; /* Remove underline from links */
    display: inline-block; /* Make it block-level to allow padding */
    border: none; /* Remove default button border */
    cursor: pointer; /* Change cursor to pointer on hover */
	border-radius: 4px;
}

.check-quotes-button button:hover {
    background-color: #fff;
    color: #000;
    border-color: #444;
}


/* Dark Mode CSS */

#theme-toggle {
    background: none;
    border: 2px solid black;
    color: black;
    padding: 5px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}

body.dark #theme-toggle {
    border-color: #ccc;
    color: #ccc;
}

body.dark {
  background-color: #111;
  color: #eee;
}

body.dark .site-card,
body.dark .card,
body.dark table {
  background-color: #222;
  color: #eee;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

body.dark .site-card .history-link,
body.dark a.back-button {
  color: #80c9ff;
}

body.dark th {
  background: #333;
  color: #fff;
}

body.dark .quote-label {
  background: #333;
  color: #fff;
}

body.dark tr:nth-child(even) {
  background-color: #1c1c1c;
}

body.dark .dashboard-header {
  background: #222;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

body.dark .filter-form select,
body.dark .filter-form .small-btn,
body.dark .header-buttons .small-btn {
  background-color: #333;
  color: #eee;
  border: 1px solid #444;
}

body.dark a {  
  background: #444;
  color: #fff;
}

body.dark a:hover {  
  background: #000;
  color: #fff;
}

body.dark .dropdown-btn {    
  color: #fff;
}

/* Text View */
.text-list-view {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 10px;
  font-size: 0.95rem;
}

.text-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
  gap: 10px;
}

.text-site {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-count {
  font-weight: bold;
  min-width: 30px;
  text-align: right;
}

.text-history {
  text-align: right;
}

body.dark .text-row {
  border-color: #444;
}

.grand-total {
  text-align: center;
  font-size: 1.5rem;
  margin-left: 40px;
}

.quote-search {
	padding: 20px;
    margin-top: 20px;
	margin-bottom: 50px;
}
