/* The Dog Hub Frontend Styles */

/* Color Palette */
:root {
  
  --heritage-50: #fffbeb;
  --heritage-100: #fef9db;
  --heritage-200: #fee7a4;
  --heritage-300: #a6a67f;
  --heritage-400: #837c6b;
  --heritage-500: #7b7263;
  --heritage-600: #a19486;
  --heritage-700: #747473;
  --heritage-800: #423d3a;
  --heritage-900: #000000;
}

/* Main Container */
.tdh-thedoghub-frontend {
  font-family: 'Inter', system-ui, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: var(--heritage -100);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(197, 207, 180, 0.1);
}

/* Messages */
.tdh-message {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  border: 1px solid;
}

.tdh-message-success {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.tdh-message-error {
  background: #fecaca;
  color: #991b1b;
  border-color: #f87171;
}

/* Header */
.tdh-thedoghub-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 20px;
  background: var(--heritage-100);
  border-radius: 12px;
  border: 1px solid var(--heritage-700);
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
  position: relative;
}

.tdh-thedoghub-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--heritage-900);
  margin: 0 0 10px 0;
}

.tdh-thedoghub-subtitle {
  font-size: 16px;
  color: var(--heritage-800);
  margin: 0 0 20px 0;
  line-height: 1.6;
}

.tdh-thedoghub-header .tdh-button {
  position: relative;
  top: 30px;
  margin-bottom: 10px;
}

/* Search Form */
.tdh-search-form {
  background: var(--heritage-100);
  border: 1px solid var(--heritage-700);
  border-radius: 12px;
  padding: 24px;
  margin-top: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
}

.tdh-search-fields {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Add formatting for month and year */
.tdh-search-input,
.tdh-type-select {
  padding: 12px 16px;
  border: 2px solid var(--heritage-400);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--heritage-900);
  font-weight: 500;
}

.tdh-search-input {
  flex: 1;
  min-width: 200px;
}

.tdh-type-select {
  min-width: 140px;
}

.tdh-search-input::placeholder {
  color: var(--heritage-600);
  font-weight: 400;
}

/* Add formatting for month and year */
.tdh-search-input:focus,
.tdh-type-select:focus {
  border-color: var(--heritage-600);
  box-shadow: 0 0 0 3px rgba(197, 207, 180, 0.2);
  outline: none;
  background: var(--heritage-50);
}

.tdh-search-button,
.tdh-clear-button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
}

.tdh-search-button {
  background: var(--heritage-600);
  color: white;
  border: 2px solid var(--heritage-600);
}

.tdh-search-button:hover {
  background: var(--heritage-700);
  border-color: var(--heritage-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(116, 131, 86, 0.2);
}

.tdh-clear-button {
  background: white;
  color: var(--heritage-700);
  border: 2px solid var(--heritage-400);
}

.tdh-clear-button:hover {
  background: var(--heritage-100);
  color: var(--heritage-800);
  border-color: var(--heritage-500);
  text-decoration: none;
}

.tdh-type {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--heritage-700);
}

/* Buttons */
.tdh-button {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 2px solid transparent;
}

.tdh-button-primary {
  background: var(--heritage-600);
  color: white;
  border-color: var(--heritage-600);
}

.tdh-button-primary:hover {
  background: var(--heritage-700);
  border-color: var(--heritage-700);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(116, 131, 86, 0.2);
}

.tdh-button-secondary {
  background: white;
  color: var(--heritage-700);
  border-color: var(--heritage-400);
}

.tdh-button-secondary:hover {
  background: var(--heritage-100);
  color: var(--heritage-800);
  border-color: var(--heritage-500);
  text-decoration: none;
}

.tdh-button-small, 
.tdh-button-small-left {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  margin-bottom: 5px;
  border: none;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 300;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 2px solid transparent;
  background: white;
  color: var(--heritage-700);
  border-color: var(--heritage-400);
}

.tdh-button-small-left {
  margin-right:auto;
}

.tdh-button-small:hover,
.tdh-button-small-left:hover {
  background: var(--heritage-100);
  color: var(--heritage-800);
  border-color: var(--heritage-500);
  text-decoration: none;
}

.tdh-logo-preview img,
.tdh-card-logo img {
    max-width: 80px;
    border: 1px solid var(--heritage-800);
    height: auto;
    display: block;
    margin-top: 10px;
}
.tdh-card-logo {
    margin-bottom: 8px;
}


/* Project Form */
.tdh-thedoghub-form {
  background: white;
  border: 1px solid var(--heritage-200);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
}

.tdh-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--heritage-200);
}

.tdh-form-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--heritage-900);
  margin: 0;
}

.tdh-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.tdh-form-group {
  display: flex;
  flex-direction: column;
}

.tdh-form-group-2 {
  display: flex;
  flex-direction: row;
}

.tdh-field-group {
  display: flex;
  flex-direction: column;
  background-color: var(--heritage-50);
  border: 2px solid var(--heritage-300);
  border-radius: 8px;
}

.tdh-field-group legend {
  font-weight: 600;
  color: var(--heritage-800);
  margin-bottom: 8px;
  font-size: 14px;
}

.tdh-field-group label {
  color: #747473;
}

.tdh-form-group-full {
  grid-column: 1 / -1;
}

.tdh-form-row-1-col {
    clear: both; /* Ensures the item starts on a new line */
    display: block; /* Makes the item take up the full width */
    margin-bottom: 10px; /* Adds some space below the field */
}

.tdh-form-group label,
.tdh-form-group-2 label {
  font-weight: 600;
  color: var(--heritage-800);
  margin-bottom: 8px;
  font-size: 14px;
}

.tdh-form-group input,
.tdh-form-group textarea,
.tdh-form-group select,
.tdh-form-group-2 input,
.tdh-form-group-2 textarea,
.tdh-form-group-2 select {
  padding: 12px 16px;
  border: 2px solid var(--heritage-300);
  border-radius: 8px;
  font-size: 14px;
  background: var(--heritage-50);
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--heritage-900);
}

.tdh-form-group input:focus,
.tdh-form-group textarea:focus,
.tdh-form-group select:focus,
.tdh-form-group-2 input:focus,
.tdh-form-group-2 select:focus {
  border-color: var(--heritage-600);
  box-shadow: 0 0 0 3px rgba(197, 207, 180, 0.2);
  outline: none;
  background: white;
}

.tdh-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.tdh-limits{
  padding: 25px;
}

.tdh-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--heritage-200);
}

.tdh-filter-text {
  color: var(--heritage-800);
}

/* Card Layout */
.tdh-thedoghub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.tdh-thedoghub-card {
  background: var(--heritage-100);
  border: 1px solid var(--heritage-500);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
  transition: all 0.2s ease;
}

.tdh-thedoghub-card:hover {
  box-shadow: 0 8px 16px rgba(197, 207, 180, 0.15);
  transform: translateY(-2px);
  border-color: var(--heritage-400);
}

.tdh-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 16px;
}

.tdh-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--heritage-900);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.tdh-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: right;
  gap: 8px;
}

.tdh-edit-link {
  color: var(--heritage-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.tdh-edit-link:hover {
  color: var(--heritage-800);
  background: var(--heritage-100);
  text-decoration: none;
}

.tdh-card-description {
  color: var(--heritage-700);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--heritage-200);
}

.tdh-card-meta {
  border-top: 1px solid var(--heritage-200);
  padding-top: 16px;
}

.tdh-meta-item-single {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--heritage-700);
}

.tdh-meta-item-single-text,
.tdh-card-description-text {
  color:#174d0b;
}

.tdh-meta-item-socials {
  margin-bottom: 8px;
  font-size: 22px;
}

.tdh-meta-item-socials-FB {
  color: #1877F2;
}

.tdh-meta-item {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--heritage-700);
}

.tdh-meta-item:last-child {
  margin-bottom: 0;
}

.tdh-meta-item strong {
  color: var(--heritage-800);
}

/* Styles for displaying meta items in a row */
.tdh-card-meta {
    display: flex;
    flex-direction: column; /* Stack the rows vertically */
    gap: 8px; /* Space between each meta row */
}

.tdh-meta-row {
    display: flex; /* Makes items inside display horizontally */
    flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
    gap: 15px; /* Space between the "name" and "date" items */
    align-items: center; /* Vertically align items in the row */
}

.tdh-meta-address-row {
    display: block;
    align-items: center; /* Vertically align items in the row */
    margin-top: 0%;
    margin-bottom: 10px;
}


.tdh-card-address {
  font-size: 14px;
  color: var(--heritage-800);
  margin-top: 0%;
  margin-bottom:0%;
}

/* Optional: Adjust individual meta item spacing or appearance */
.tdh-meta-item {
    /* Flex-basis can be used if you want specific width distribution, otherwise defaults work */
    /* For example: flex-basis: 48%; for two items nearly taking half each */
    flex-basis: 48%;
}

/* Table Layout */
.tdh-thedoghub-table-wrapper {
  background: white;
  border: 1px solid var(--heritage-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
  margin-bottom: 30px;
}

.tdh-thedoghub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tdh-thedoghub-table thead th {
  background: var(--heritage-100);
  color: var(--heritage-800);
  font-weight: 600;
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--heritage-200);
}

.tdh-thedoghub-table tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--heritage-100);
  vertical-align: top;
}

.tdh-thedoghub-table tbody tr:hover {
  background: var(--heritage-50);
}

.tdh-thedoghub-table tbody tr:last-child td {
  border-bottom: none;
}

.tdh-thedoghub-table td strong {
  color: var(--heritage-900);
  font-weight: 600;
}

.tdh-thedoghub-table td small {
  color: var(--heritage-600);
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

.tdh-thedoghub-table .tdh-edit-link {
  color: var(--heritage-600);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.tdh-thedoghub-table .tdh-edit-link:hover {
  color: var(--heritage-800);
  background: var(--heritage-100);
  text-decoration: none;
}

/* No Projects Message */
.tdh-no-businesses {
  text-align: center;
  padding: 40px 20px;
  color: var(--heritage-600);
  font-style: italic;
}

/* Business Count */
.tdh-thedoghub-count {
  text-align: center;
  padding: 20px;
  background: var(--heritage-100);
  border: 1px solid var(--heritage-700);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(197, 207, 180, 0.1);
}

.tdh-thedoghub-count p {
  margin: 0;
  color: var(--heritage-800);
  font-style: italic;
  font-size: 14px;
}

.tdh-card-link-wrapper {
    text-decoration: none; /* Remove underline from the link */
    color: inherit; /* Inherit text color from parent */
    display: block; /* Make the link a block-level element to wrap the card */
}

.tdh-card-link-wrapper:hover .tdh-card {
    /* Optional: Add a hover effect to the card when the link is hovered */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    transition: all 0.2s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tdh-thedoghub-frontend {
    padding: 16px;
  }
  
  .tdh-thedoghub-title {
    font-size: 24px;
  }
  
  .tdh-thedoghub-subtitle {
    font-size: 14px;
  }
  
  .tdh-thedoghub-header {
    padding: 20px 16px;
  }
  
  .tdh-thedoghub-header .tdh-button {
    position: static;
    margin-top: 16px;
  }
  
  .tdh-search-fields {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tdh-search-input,
  .tdh-type-select {
    min-width: auto;
    width: 100%;
  }
  
  .tdh-thedoghub-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tdh-thedoghub-card {
    padding: 20px;
  }
  
  .tdh-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .tdh-card-actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  
  .tdh-thedoghub-table-wrapper {
    overflow-x: auto;
  }
  
  .tdh-thedoghub-table {
    min-width: 600px;
  }
  
  .tdh-thedoghub-table thead th,
  .tdh-thedoghub-table tbody td {
    padding: 12px 8px;
  }
  
  .tdh-thedoghub-form {
    padding: 20px;
  }
  
  .tdh-form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .tdh-form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tdh-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .tdh-thedoghub-header {
    padding: 16px 12px;
  }
  
  .tdh-search-form {
    padding: 16px;
  }
  
  .tdh-thedoghub-card {
    padding: 16px;
  }
  
  .tdh-card-title {
    font-size: 18px;
  }
  
  .tdh-thedoghub-table {
    font-size: 13px;
  }
  
  .tdh-thedoghub-form {
    padding: 16px;
  }
  
  .tdh-form-header h2 {
    font-size: 24px;
  }
}

/* Print Styles */
@media print {
  .tdh-search-form,
  .tdh-thedoghub-header .tdh-button,
  .tdh-edit-link,
  .tdh-form-actions {
    display: none;
  }
  
  .tdh-thedoghub-frontend {
    box-shadow: none;
    background: white;
  }
  
  .tdh-thedoghub-card,
  .tdh-thedoghub-table-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .tdh-thedoghub-card:hover {
    transform: none;
  }
}