/* whatsapp.css */
/* whatsapp.css - Enhanced Styles for WhatsApp Opt-in Page */



/* Container Styles */
.whatsapp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Explanation Section */
.explanation-section {
    margin-bottom: 40px;
}

.explanation-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.explanation-section p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.explanation-section a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}

.explanation-section a:hover {
    text-decoration: underline;
}

/* Opt-in Section */
.optin-section {
    background-color: var(--box-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
}

.optin-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.optin-section p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Form Styles */
.optin-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

/* Phone Group */
.phone-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.phone-group label {
    font-size: 14px;
    color: var(--text-color);
}

.phone-group select,
.phone-group input[type="tel"] {
    padding: 10px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.phone-group select:focus,
.phone-group input[type="tel"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 10px;
}

.consent-label a {
    color: var(--link-color);
    text-decoration: none;
}

.consent-label a:hover {
    text-decoration: underline;
}

input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
}

.submit-btn {
    padding: 12px 24px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-1px);
}

/* Status Message */
.status-message {
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Logs Section */
.logs-section {
    background-color: var(--box-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.logs-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.logs-section p {
    font-size: 16px;
    margin-bottom: 20px;
}

.logs-list {
    list-style-type: none;
    padding: 0;
}

.logs-list li {
    background-color: var(--input-bg);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    transition: background-color 0.3s ease;
}
.checkbox-group {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px 16px;
    margin: 15px 0;
    background-color: var(--input-bg);
}
.checkbox-group .consent-label {
    margin-bottom: 12px;
}
.checkbox-group .consent-label:last-child {
    margin-bottom: 0;
}

/* Replace the existing .consent-label rules with these */

.consent-label {
    display: block;                  /* ← key change */
    position: relative;              /* for absolute checkbox */
    padding-left: 32px;              /* space for checkbox + some margin */
    line-height: 1.5;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 12px;
}

.consent-label input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 4px;                        /* vertical alignment tweak - adjust if needed */
    margin: 0;
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.consent-label a {
    color: var(--link-color);
    text-decoration: none;
}

.consent-label a:hover {
    text-decoration: underline;
}

/* Add space between Current Logs and Log Symptom sections */
#current-logs {
    margin-bottom: 60px;   /* or 40px–80px depending on how much space you want */
}

/* Optional: also give the log-symptom section a top margin if needed */
#log-symptom {
    margin-top: 20px;      /* small extra buffer */
}

.logs-list li:hover {
    background-color: var(--table-hover-bg);
}

.logs-list li span {
    flex-grow: 1;
}

.logs-list li button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.logs-list li button:hover {
    background-color: var(--button-hover-bg);
}

.consent-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    accent-color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
}

/* Table Styles for Logs */
#logs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#logs-table th,
#logs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

#logs-table th {
    background-color: var(--table-header-bg);
    font-weight: bold;
    cursor: pointer;
}

#logs-table tbody tr:hover {
    background-color: var(--table-hover-bg);
}

/* Explicit column widths */
#logs-table th:nth-child(1),
#logs-table td:nth-child(1) {
    width: 22%;
}

#logs-table th:nth-child(2),
#logs-table td:nth-child(2) {
    width: 18%;
}

#logs-table th:nth-child(3),
#logs-table td:nth-child(3) {
    width: 18%;
}

#logs-table th:nth-child(4),
#logs-table td:nth-child(4) {
    width: 32%;
}

#logs-table th:nth-child(5),
#logs-table td:nth-child(5) {
    width: 10%;
}

/* Sort arrow styling */
.sort-arrow {
    margin-left: 5px;
    font-size: 12px;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    #logs-table th,
    #logs-table td {
        padding: 10px 8px;
    }

    #logs-table th:nth-child(1),
    #logs-table td:nth-child(1) { width: 25%; }

    #logs-table th:nth-child(2),
    #logs-table td:nth-child(2) { width: 20%; }

    #logs-table th:nth-child(3),
    #logs-table td:nth-child(3) { width: 20%; }

    #logs-table th:nth-child(4),
    #logs-table td:nth-child(4) { width: 25%; }

    #logs-table th:nth-child(5),
    #logs-table td:nth-child(5) { width: 10%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-container {
        padding: 20px 10px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .hero-section p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .optin-form {
        width: 100%;
    }

    .submit-btn {
        width: 100%;
    }

    .consent-label {
        font-size: 14px;
    }
}