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

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.page {
    display: none;
    padding: 40px 24px;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
    z-index: 1;
}

.active {
    display: block;
    transform: translateX(0);
}

/* Consent Page Styles */
.close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: #999;
    cursor: pointer;
}

h1 {
    font-size: 28px;
    text-align: center;
    margin: 40px 0 20px;
    color: #222;
    line-height: 1.3;
}

.subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: #222;
    font-size: 16px;
    padding: 0 20px;
}


.consent-text {
    font-size: 14px;
    color: #333;
    margin: 30px 0;
}

.consent-text p {
    margin-bottom: 15px;
}

.consent-text a {
    color: #0066cc;
    text-decoration: underline;
}

.allow-btn {
    background-color: #a9c23f;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 0;
    width: 180px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 30px auto;
    transition: background-color 0.3s;
}

.allow-btn:hover {
    background-color: #97ae36;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Preferences Page Styles */
.ahm-logo {
    width: 80px;
    height: 80px;
    margin: 20px auto 10px;
    background-image: url(./logo.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.preferences-table {
    margin: 40px 0;
    width: 100%;
}

.preferences-header {
    display: flex;
    margin-bottom: 10px;
}

.column-label {
    flex: 1;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    padding: 10px 0;
}

.column-label:first-child {
    text-align: left;
    flex: 0.8;
}

.preferences-row {
    display: flex;
    margin: 15px 0;
    align-items: center;
}

.row-label {
    flex: 0.8;
    font-size: 18px;
    font-weight: 500;
}

.checkbox-cell {
    flex: 1;
    text-align: center;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #3a97d1;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    vertical-align: top;
}

input[type="checkbox"]:checked:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #3a97d1;
    top: 2px;
    left: 2px;
    border-radius: 2px;
}

.checkbox-container {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.checkbox-container input {
    flex-shrink: 0;
    margin-top: 3px;
}

.checkbox-container label {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.input-group {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border: 2px solid #3a97d1;
    border-radius: 8px;
}

.input-group label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
}

.input-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input[type="tel"]:focus {
    border-color: #3a97d1;
    box-shadow: 0 0 0 3px rgba(58, 151, 209, 0.1);
}

.input-group input[type="tel"]::placeholder {
    color: #999;
}

.terms-links {
    text-align: center;
    margin: 30px 0;
    font-size: 14px;
}

.terms-links a {
    color: #0066cc;
    text-decoration: underline;
}

.save-btn {
    background-color: #3a97d1;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 0;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background-color: #2d78a6;
}

/* Confirmation Page */
#confirmation-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: white;
    z-index: 10; /* Ensure it appears on top */
}

#confirmation-page h1 {
    margin-bottom: 20px;
}

#confirmation-page p {
    font-size: 18px;
    margin-bottom: 30px;
}

#finish-btn {
    background-color: #3a97d1;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 0;
    width: 180px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#finish-btn:hover {
    background-color: #2d78a6;
}

