/* ==================== RESET STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #ddd;
    width: 100%;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    position: relative;
    margin: 0 15px;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

.nav-links li a:hover {
    background: #007bff;
    color: white;
}

/* ✅ Dropdown Styling */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.dropdown-menu li {
    display: block;
    padding: 5px;
}

.dropdown-menu li a {
    display: block;
    padding: 5px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background: #007bff;
    color: white;
}

/* ✅ Show Dropdown on Hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* ==================== MAIN CONTENT ==================== */
main {
    width: 95%;
    max-width: 1600px;
    margin: auto;
    padding: 20px;
}

/* ==================== TABLES ==================== */
#results {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

/* ==================== FILTER & COLUMN SELECTION ==================== */
#filterSection {
    display: flex;
    flex-direction: column; /* Stacks elements in a structured way */
    align-items: flex-start;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    gap: 15px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for clean look */
    border: 1px solid #ddd; /* Light border for definition */
}

#filterSection form {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Dynamic grid */
    gap: 15px;
    width: 100%;
    align-items: center;
}

#filterSection label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

#filterSection input,
#filterSection select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
}

/* Filter & Apply Button Styling */
#filterSection button {
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

#filterSection button:hover {
    background: #0056b3;
    transform: scale(1.02);
}

/* ==================== COLUMN SELECTION MENU ==================== */
#columnSelector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Ensures proper alignment */
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

#columnSelector label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    gap: 5px;
    cursor: pointer;
}

#columnSelector input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #007bff; /* Match filter button color */
    cursor: pointer;
}

/* Ensure Menu Buttons Are Styled Consistently */
.button-container {
    display: flex;
    gap: 10px;
    margin: 20px 0px 20px 0px;
}

.button-container button {
    background: #007bff;
    color: white;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #0056b3;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.button-container button:hover {
    background: #0056b3;
    transform: scale(1.02);
}
/* ==================== BUTTONS ==================== */
button {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

button:hover {
    background: #218838;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.button-container button {
    background: #007bff;
    color: white;
    padding: 8px 15px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #0056b3;
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease;
}

.button-container button:hover {
    background: #0056b3;
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 10px;
    background: #222;
    color: white;
    position: fixed;
    width: 100%;
    bottom: 0;
}

/* ==================== DASHBOARD ==================== */
.dashboard {
    width: 95%;
    max-width: 1600px;
    margin: auto;
    padding: 20px;
}

.dashboard h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h2 {
    color: #007bff;
    font-size: 18px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

/* ==================== QUICK LINKS ==================== */
.quick-links {
    text-align: center;
    margin-top: 30px;
}

.quick-links .btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.quick-links .btn:hover {
    background: #0056b3;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==================== LISTING PAGE ==================== */
.listing-container {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

.listing-header {
    text-align: center;
    margin-bottom: 20px;
}

.listing-header h1 {
    font-size: 32px;
    color: #333;
}

.listing-header p {
    font-size: 18px;
    color: #555;
}

.listing-highlights {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.highlight {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
}

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

.listing-section {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.listing-section h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

/* Back Button */
.listing-container a {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.listing-container a:hover {
    background: #0056b3;
}

.back-button:hover {
    background: #0056b3;
}

/* ==================== REPORTS & CHARTS ==================== */
.report-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

#chartContainer {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    max-width: 100%;
    height: 100%;
}

/* ==================== SYNC PAGE ==================== */

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    gap: 10px;
    margin-top: 30px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-section form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.filter-section label {
    font-weight: bold;
    margin-right: 5px;
}

.filter-section input,
.filter-section select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 150px;
}

/* Filter Button */
.filter-section button {
    background: #007bff;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.filter-section button:hover {
    background: #0056b3;
}

/* ==================== LEAD DETAIL ==================== */

/* ✅ Page Container */
.lead-container {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* ✅ Header */
.lead-header {
    text-align: center;
    margin-bottom: 20px;
}

.lead-header h1 {
    font-size: 28px;
    color: #333;
}

.lead-header h2 {
    font-size: 22px;
    color: #555;
    margin-bottom: 10px;
}

.lead-header p {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

/* ✅ Grid Layout for Details */
.lead-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* ✅ Individual Sections */
.lead-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.lead-section h2 {
    font-size: 20px;
    color: #444;
    margin-bottom: 10px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.lead-section p {
    font-size: 16px;
    margin: 5px 0;
}

/* ✅ Skip Traced Data Section */
.lead-section ul {
    list-style-type: none;
    padding: 0;
}

.lead-section ul li {
    font-size: 16px;
    padding: 5px;
    background: #e9f5ff;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* ✅ Back to Leads Link */
.lead-container p a {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    color: #007bff;
    font-weight: bold;
    margin-top: 15px;
}

.lead-container p a:hover {
    text-decoration: underline;
}

/* ✅ Responsive Design */
@media (max-width: 768px) {
    .lead-grid {
        grid-template-columns: 1fr;
    }
}

/* Remove blue focus border from all links */
a, a:focus, a:active {
    outline: none !important;
    border: none !important;
}

/* Gallery container split into two columns */
.gallery-container {
  display: grid;
  grid-template-columns: 2fr 2fr;
  gap: 10px;
  margin: 20px 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
}

.gallery-container a {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  text-decoration: none !important;
}


/* Left column: Main image container with 16:9 ratio */
.gallery-left {
  position: relative;
  width: 100%;
  padding-bottom: 75%;  /* 16:9 aspect ratio */
  overflow: hidden;
}
.gallery-left a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.gallery-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right column: Thumbnails grid container */
.gallery-right {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Thumbnails grid: 2 columns x 2 rows */
.thumbnails-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  flex-grow: 1;
}
.thumbnails-grid a {
  display: block;
  position: relative;
  width: 100%;
  padding-bottom: 100%;  /* force a square */
  overflow: hidden;
  text-decoration: none;
}
.thumbnails-grid a img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "See all" button overlay */
.see-all-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  border-radius: 5px;
}
.see-all-overlay a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
}

.hidden-lightbox-container {
  display: none;
}

.hidden-lightbox-link {
  display: none;
}

/* ==================== EMAIL CAMPAIGN PAGE ==================== */
.email-campaign-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.email-campaign-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== EMAIL CAMPAIGN TABLE ==================== */
.email-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}

.email-table th, .email-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
}

.email-table th {
    background-color: #007bff;
    color: white;
    font-size: 18px;
}

.email-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ==================== EMAIL FORM ==================== */
.email-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
}

.email-form label {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.email-form input, .email-form textarea, .email-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
}

.email-form button {
    background: #007bff;
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.email-form button:hover {
    background: #0056b3;
    transform: scale(1.02);
}

/* ==================== EMAIL CAMPAIGN LIST CARDS ==================== */
.email-campaign-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.email-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.email-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
}

.email-card h3 {
    color: #007bff;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.email-card p {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}

.email-card .email-status {
    font-weight: bold;
    color: #28a745;
}

.email-card .email-status.failed {
    color: #dc3545;
}
