/* General styling */
body {
    font-family: 'Open Sans', 'Lato', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Header styling */
header {
    background-color: #ffffff;
    color: #333;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    color: #0056b3;
    font-size: 28px;
    margin-top: 0;
}

/* Form styling */
form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 50px auto;
    padding: 20px;
    box-sizing: border-box;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    height: 40px;
    padding: 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333;
}

button {
    padding: 10px 40px;
    background-color: #0056b3;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #004494;
}

/* Div styling */
div {
    margin-bottom: 10px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    box-sizing: border-box;
    border-radius: 8px;
    color: #333;
}

header img {
    width: 150px;
    margin-bottom: 10px;
}

#queryForm label, #queryForm input, #queryForm select, #queryForm textarea {
    display: block;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}
#queryForm input[type="submit"] {
    margin-top: 15px;
}

.tab-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 20px;
    max-width: 600px;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 5px 5px 0 0;
    user-select: none;
}
.tab.active {
    background-color: #007BFF;
    color: white;
}

.row-container {
    display: flex;
    gap: 20px;
    max-width: 900px;
    margin: 20px auto;
    align-items: flex-start;
}
.form-column, .instructions-column {
    flex: 1;
}

.instruction-box {
    border: 2px solid #007BFF;
    padding: 15px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}
.instruction-box strong {
    font-size: 18px;
}
.instruction-box p {
    margin: 10px 0;
}

.table-controls {
    text-align: right;
    max-width: 600px;
    margin: 10px auto;
}
.project-selector {
    display: none;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}
.project-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.track-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.track-button {
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.track-button:hover {
    background-color: #218838;
}
.track-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
#downloadCsvBtn,
#downloadFilteredCsvBtn {
    padding: 10px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 8px 10px;
    border: 1px solid #ccc;
}
th {
    background-color: #eee;
}

.bill-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.bill-table th,
.bill-table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.bill-table th {
    background-color: #f8fafc;
    font-weight: 600;
}
.bill-table tr:hover {
    background-color: #f1f5f9;
}
.bill-link {
    color: #2563eb;
    text-decoration: none;
}
.bill-link:hover {
    text-decoration: underline;
}

.project-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.project-table th,
.project-table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.project-table th {
    background-color: #f8fafc;
    font-weight: 600;
}
.project-table tr:hover {
    background-color: #f1f5f9;
}

.delete-btn {
    background-color: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}
.delete-btn:hover {
    background-color: #dc2626;
}

.form-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}
.form-button {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}
.form-button:hover {
    background-color: #1d4ed8;
}

.coming-soon {
    text-align: center;
    padding: 50px;
    font-size: 24px;
    color: #666;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}
.column {
    width: 100%;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.data-table th,
.data-table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
}
.data-table tr:hover {
    background-color: #f1f5f9;
}
.section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a202c;
}
.pending-list {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}
.pending-list li {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hidden {
    display: none;
}
.action-button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}
.show-details-btn {
    background-color: #2563eb;
    color: white;
}
.show-details-btn:hover {
    background-color: #1d4ed8;
}

/* Hamburger Menu Button */
.hamburger {
    position: fixed;
    z-index: 100;
    top: 1rem;
    right: 1rem;
    padding: 4px;
    border: 1px solid #000;
    background: #0056b3;
    cursor: pointer;
}
.closeIcon {
    display: none;
}
.menu {
    position: fixed;
    top: 3.5rem;
    right: 1rem;
    background: #ebebeb;
    color: #000;
    list-style: none;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    display: none;
    z-index: 99;
}
.showMenu {
    display: block;
}
.menu li {
    margin: 0.5rem 0;
}
.menu li a {
    text-decoration: none;
    color: #000;
}
#loadingSpinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
#loadingSpinner img {
    display: block;
    margin: 0 auto;
}

/* Subscription Management Page Specific Styles */
.checkbox-container {
    display: inline-block;
    margin: 10px;
}

.email-container {
    margin-top: 20px;
}

/* Custom topics table specific styling */
#customTopicsTable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

#customTopicsTable td {
    width: 33.33%;
    vertical-align: top;
}

.checkbox-container.custom-topic {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 5px 0;
    width: 90%;
}