/* General Reset & Base Styles */
html {
    scroll-behavior: smooth;
    box-sizing: border-box; /* Global box-sizing for easier layout */
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Modern font stack */
    background: linear-gradient(135deg, #e0f2f7 0%, #c1e0e7 100%); /* Soft, animated gradient background */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll from subtle animations */
    color: #333; /* Default text color */
}

/* Container Styling */
.container {
    background-color: #ffffff; /* Pure white for a clean look */
    padding: 40px; /* More generous padding */
    border-radius: 12px; /* Softer rounded corners */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); /* Deeper, more subtle shadow */
    width: 90%;
    max-width: 550px; /* Current max-width for better layout on medium screens */
    position: relative;
    opacity: 0; /* Start hidden for entrance animation */
    transform: translateY(20px); /* Start slightly below for slide-up */
    animation: fadeInSlideUp 0.8s ease-out forwards; /* Entrance animation */
    transition: all 0.3s ease-in-out; /* For hidden/shown state changes */
}

/* Animation for container entrance */
@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Styling */
.logo {
    display: block;
    margin: 0 auto 30px; /* More space below logo */
    max-width: 180px; /* Slightly larger logo */
    height: auto;
    transition: transform 0.3s ease-in-out; /* Subtle bounce on hover */
}

.logo:hover {
    transform: scale(1.03);
}

/* Headings */
h1, h2 {
    text-align: center;
    color: #2c3e50; /* Darker, more professional blue-grey */
    margin-bottom: 25px;
    font-weight: 600; /* Slightly bolder */
    letter-spacing: -0.5px; /* Tighter letter spacing for modern feel */
}

/* Form Group & Labels */
.form-group {
    margin-bottom: 20px; /* Increased spacing between form groups */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, margin-bottom 0.3s ease-out;
}

#phonePriceGroup label {
    font-weight: 600; /* Make this label a bit bolder */
}

label {
    display: block;
    margin-bottom: 8px; /* More space between label and input */
    color: #4a4a4a; /* Softer dark grey */
    font-weight: 500; /* Medium weight */
    font-size: 0.95rem; /* Slightly smaller for elegance */
}

/* Input Fields & Selects */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Show Password Toggle */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    padding-right: 40px;
}

.show-password-checkbox {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    opacity: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.show-password-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1;
}

.show-password-label i {
    pointer-events: none;
    color: #4a4a4a;
}

.show-password-checkbox:hover + .show-password-label i,
.show-password-checkbox:focus + .show-password-label i {
    color: #007bff;
}

/* Submit & General Buttons */
.submit-button {
    background-color: #007bff;
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    display: block;
    margin-top: 25px;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.submit-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.submit-button.small-button {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Back Button (general style) */
.back-button {
    background-color: #e9ecef;
    color: #495057;
    padding: 12px 20px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    display: block;
    margin-top: 15px;
    transition: all 0.3s ease-in-out;
}

.back-button:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.back-button:active {
    transform: translateY(0);
}

/* Utility Class for Hidden Elements */
.hidden {
    display: none !important;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Visible class for animated appearance */
.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Loading, Success, Error Messages */
.status-message {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    transform: translateY(10px);
}

.status-message.visible {
    opacity: 1;
    transform: translateY(0);
}

#loading {
    color: #007bff;
    background-color: #e6f7ff;
    border: 1px solid #b3e0ff;
}

#successContainer {
    color: #28a745;
    background-color: #e6ffe6;
    border: 1px solid #a4e6a4;
}

#errorMessage, #loginError, #trackingError {
    color: #dc3545;
    background-color: #ffe6e6;
    border: 1px solid #e6a4a4;
}

/* Loader Animation */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* QR Code and Download Link Section */
#pdfLinkSection {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #f8f9fa;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInSlideUp 0.6s ease-out forwards 0.2s;
}

#pdfLinkSection p {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #555;
}

#qrcode {
    margin-bottom: 15px;
}

#qrcode canvas {
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Download Link as Button */
#downloadLink {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

#downloadLink:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
}

#downloadLink:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

/* Validation Error Highlighting */
input.error,
select.error {
    border-color: #dc3545;
    background-color: #fffafa;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Plan Options Container (now grid) */
.plan-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: 20px; /* Increased gap for better separation */
    margin-top: 20px;
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.plan-options-grid.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Individual Plan Button/Card */
.plan-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Stack text and price/features */
    align-items: flex-start; /* Align content to the start */
    position: relative; /* CRITICAL: Establishes positioning context for absolute children */
    overflow: hidden; /* This is key to prevent ribbon from showing where it shouldn't if JS is off */
    min-height: 180px; /* Ensure a consistent minimum height for all cards */
}

.plan-card:hover {
    background-color: #f0f8ff;
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 123, 255, 0.1);
}

.plan-card.selected {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
    transform: scale(1.02);
}

.plan-card .plan-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: inherit;
}

.plan-card .plan-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px; /* More space before price/period group */
    flex-grow: 1; /* Pushes price/period group to the bottom */
}

.plan-card.selected .plan-description {
    color: rgba(255, 255, 255, 0.8);
}

/* NEW: Wrapper for Price and Period */
.plan-price-period-group {
    width: 100%; /* Take full width of card */
    display: flex;
    justify-content: flex-start; /* Aligns price/period to the left */
    align-items: baseline; /* Align price and period at their baseline */
    margin-top: auto; /* Ensure it sticks to the bottom */
    gap: 10px; /* Consistent spacing between price and period */
    padding-top: 10px; /* Give some space above it */
    flex-wrap: wrap; /* Allow wrapping on very small screens if necessary */
}

.plan-card .plan-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: #28a745;
    text-align: left; /* Ensure text aligns left */
    flex-shrink: 0; /* Prevent price from shrinking */
}

.plan-card.selected .plan-price {
    color: white;
}

.plan-card .plan-period {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
    text-align: left; /* Align with price */
    flex-shrink: 0; /* Prevent period from shrinking */
    /* Removed margin-left: auto; as we want left alignment now */
}

.plan-card.selected .plan-period {
    color: rgba(255, 255, 255, 0.7);
}

/* Combo Plan Specific Styles - Eye Catchy Layout */
.combo-plan-card {
    border: 2px solid #FFD700; /* Gold border to make it stand out */
    background-color: #FFFACD; /* Light yellow background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* More pronounced shadow */
    position: relative; /* ESSENTIAL: This makes positioning context for badge */
    transform: scale(1.03); /* Slightly larger by default */
    z-index: 10; /* Bring to front a bit */
    animation: pulseBorder 1.5s infinite alternate ease-in-out; /* Subtle pulsing border */
    padding-top: 40px; /* Make space for the new badge */
}

.combo-plan-card:hover {
    border-color: #ffa000; /* Darker orange on hover */
    box-shadow: 0 8px 20px rgba(255, 160, 0, 0.3);
    transform: translateY(-5px) scale(1.05); /* More pronounced lift and scale */
}

.combo-plan-card.selected {
    background: linear-gradient(145deg, #0056b3 0%, #003d80 100%); /* Darker blue gradient when selected */
    border-color: #ffc107; /* Keep yellow border when selected */
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4), 0 0 0 4px rgba(255, 193, 7, 0.5); /* Blue glow with yellow outline */
    transform: scale(1.05); /* Larger scale when selected */
}

.combo-plan-card .plan-name {
    color: #d39e00; /* Darker yellow for combo plan name */
    font-size: 1.25rem; /* Larger font for combo name */
    font-weight: 700;
}

.combo-plan-card.selected .plan-name {
    color: white;
}

.combo-plan-card .plan-description {
    color: #7a6100; /* Darker description for combo plan */
    font-weight: 500;
}

.combo-plan-card.selected .plan-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Specific styling for combo plan price and period for better visibility */
.combo-plan-card .plan-price {
    color: #ff4500; /* Orange-red for combo plan price */
    font-size: 1.5rem; /* Even larger price for combo */
    font-weight: 900;
}

.combo-plan-card.selected .plan-price {
    color: #ffc107;
}


/* NEW: "Best Value" Badge Styling - Modern and Prominent */
.best-value-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0; /* Stretches across the top */
    background-color: #FF4500; /* Eye-catching orange-red */
    color: white;
    text-align: center;
    padding: 8px 0; /* Vertical padding for height */
    font-size: 0.9em; /* Readable size */
    font-weight: bold;
    border-top-left-radius: 10px; /* Match card radius */
    border-top-right-radius: 10px; /* Match card radius */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    letter-spacing: 0.05em; /* A little spacing for style */
    text-transform: uppercase; /* All caps */
    z-index: 101; /* Ensure it's above everything else */
    overflow: hidden; /* Just in case */
}

/* Removed old ribbon styles: .best-value-ribbon, .best-value-ribbon::before, .best-value-ribbon::after */


/* Styling for the new offer text */
.combo-offer-text {
    font-size: 0.85em;
    font-weight: bold;
    color: #DAA520;
    margin-top: 8px;
    text-align: center;
    padding: 0 10px;
    line-height: 1.3;
    width: 100%; /* Ensure it takes full width for centering */
    box-sizing: border-box; /* Include padding in width */
}

@keyframes pulseBorder {
    0% { border-color: #ffc107; box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2); }
    100% { border-color: #ffd700; box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4); }
}


/* New style for the displayed phone price info */
.displayed-phone-price-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #eaf5ff;
    border: 1px solid #cce7ff;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.displayed-phone-price-info strong {
    font-size: 1.3rem;
    color: #007bff;
}

.displayed-phone-price-info .back-button {
    width: auto;
    max-width: 250px;
    margin: 0;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.displayed-phone-price-info .back-button:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Login Section Specific Styles */
#loginSection h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

#loginSection .submit-button {
    margin-top: 30px;
}

#loginSection .loader {
    border-top: 3px solid #007bff;
}

/* Store ID Display */
.store-id-display {
    margin-bottom: 25px;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.store-id-label {
    color: #555;
    font-weight: 500;
    margin-right: 5px;
}

.store-id-value {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Logout Button (original position, now moved into drawer) */
#logoutButton {
    position: absolute;
    top: 20px;
    right: 20px;
    display: none;
}

/* Logout button specifically inside the drawer */
.drawer .logout-button {
    position: static;
    margin-top: auto;
    margin-bottom: 20px;
    width: calc(100% - 40px);
    align-self: center;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.drawer .logout-button:hover {
    background-color: #b02a37;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.3);
}

.drawer .logout-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

/* --- DRAWER (SIDEBAR) STYLES --- */
.hamburger-menu {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #007bff;
    cursor: pointer;
    z-index: 100;
    transition: color 0.3s ease-in-out;
}

.hamburger-menu:hover {
    color: #0056b3;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    max-width: 300px;
    background-color: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-x: hidden;
    transition: width 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

.drawer.open {
    width: 280px;
}

.drawer-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

.drawer-close-button:hover {
    color: #333;
}

.drawer-content {
    flex-grow: 1;
    padding: 20px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.drawer-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.drawer-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
}

.drawer-header .store-id-value {
    font-size: 1rem;
    font-weight: 600;
    color: #007bff;
    letter-spacing: 0.2px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.drawer-menu-item {
    background: none;
    border: none;
    color: #555;
    text-align: left;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-menu-item:hover {
    background-color: #f0f8ff;
    color: #007bff;
}

.drawer-menu-item i {
    font-size: 1.5rem;
}

/* Drawer Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.drawer-overlay.visible {
    opacity: 1;
}

/* --- TRACKING SECTION STYLES --- */
.tracking-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.tracking-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.tracking-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    text-align: center;
}

.tracking-results {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.tracking-results.visible {
    opacity: 1;
    transform: translateY(0);
}

.tracking-results h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #007bff;
    font-size: 1.1rem;
    text-align: center;
}

.tracking-results p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #4a4a4a;
    display: flex;
    justify-content: space-between;
}

.tracking-results strong {
    color: #2c3e50;
    font-size: 1.05rem;
    font-weight: 700;
}

/* --- NEW: Terms and Conditions Section Styles --- */
.terms-and-conditions-section {
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-top: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.terms-and-conditions-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.terms-and-conditions-section h4 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.terms-and-conditions-section .plan-name-display {
    font-weight: bold;
    color: #007bff;
}

.terms-and-conditions-content {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}

.terms-and-conditions-content p {
    margin-bottom: 10px;
}

.terms-and-conditions-content strong {
    font-weight: 600;
    color: #333;
}

/* FIX: Checkbox alignment styles for .terms-checkbox-group */
.terms-checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.terms-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    appearance: none;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    position: relative;
    top: 2px;
    flex-shrink: 0;
}

.terms-checkbox-group input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.terms-checkbox-group input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.terms-checkbox-group label {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.3;
}

.terms-checkbox-group label a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

.terms-checkbox-group label a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        border-radius: 10px;
    }

    h1, h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .logo {
        max-width: 160px;
        margin-bottom: 25px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="number"],
    input[type="password"],
    select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .submit-button,
    .back-button,
    #downloadLink {
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Adjustments for general plan cards */
    .plan-card {
        font-size: 0.95rem;
        padding: 12px 15px;
    }

    .plan-card .plan-price {
        font-size: 1.05rem;
    }

    /* Adjustments for combo plan cards on smaller screens */
    .combo-plan-card .plan-name {
        font-size: 1.15rem; /* Slightly smaller combo name */
    }
    .combo-plan-card .plan-price {
        font-size: 1.25rem; /* Slightly smaller combo price */
    }
    /* Badge adjustment for smaller screens */
    .best-value-badge {
        width: 100%; /* Full width on smaller screens */
        font-size: 0.8em;
        padding: 6px 0;
    }
    .combo-offer-text {
        font-size: 0.8em; /* Adjust for medium screens */
    }


    #pdfLinkSection {
        padding: 15px;
    }

    .drawer .logout-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .displayed-phone-price-info {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    .displayed-phone-price-info strong {
        font-size: 1.1rem;
    }
    .displayed-phone-price-info .back-button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .hamburger-menu {
        font-size: 1.8rem;
        top: 15px;
        left: 15px;
    }

    .drawer {
        max-width: 250px;
    }

    .drawer.open {
        width: 250px;
    }

    .drawer-close-button {
        font-size: 1.6rem;
    }

    .drawer-header h3 {
        font-size: 1.3rem;
    }

    .drawer-menu-item {
        font-size: 0.95rem;
        padding: 10px 12px;
    }

    .drawer-menu-item i {
        font-size: 1.3rem;
    }

    .tracking-section {
        padding: 15px;
    }

    .tracking-section h4 {
        font-size: 1.1rem;
    }

    .tracking-results p {
        font-size: 0.9rem;
    }

    .tracking-results strong {
        font-size: 1rem;
    }

    .terms-and-conditions-section {
        padding: 20px;
    }
    .terms-and-conditions-section h4 {
        font-size: 1.2rem;
    }
    .terms-and-conditions-content {
        max-height: 150px;
        padding: 12px;
    }
    .terms-checkbox-group label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
        border-radius: 8px;
    }

    h1, h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .logo {
        max-width: 140px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .submit-button.small-button {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .plan-options-grid { /* Still grid for stacking */
        grid-template-columns: 1fr;
        gap: 15px; /* Slightly reduced gap */
    }
    
    /* Further adjustments for all plan cards on very small screens */
    .plan-card {
        padding: 10px 12px;
    }
    .plan-card .plan-name {
        font-size: 1rem;
    }
    .plan-card .plan-description {
        font-size: 0.8rem;
    }
    .plan-card .plan-price {
        font-size: 1.1rem;
    }

    /* Further adjustments for combo plan cards on very small screens */
    .combo-plan-card .plan-name {
        font-size: 1.1rem;
    }
    .combo-plan-card .plan-price {
        font-size: 1.2rem;
    }
    /* Badge adjustment for very small screens */
    .best-value-badge {
        font-size: 0.7em;
        padding: 5px 0;
    }
    .combo-offer-text {
        font-size: 0.75em; /* Adjust for small screens */
    }


    .displayed-phone-price-info {
        padding: 6px 8px;
        font-size: 0.85rem;
    }
    .displayed-phone-price-info strong {
        font-size: 1rem;
    }
    .displayed-phone-price-info .back-button {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .drawer.open {
        width: 100%;
        max-width: 100%;
    }

    .terms-and-conditions-section {
        padding: 15px;
    }
    .terms-and-conditions-section h4 {
        font-size: 1.1rem;
    }
    .terms-and-conditions-content {
        max-height: 120px;
        padding: 10px;
    }
    .terms-checkbox-group label {
        font-size: 0.85rem;
    }
    .terms-checkbox-group input[type="checkbox"] {
        min-width: 18px;
        min-height: 18px;
    }
    .terms-checkbox-group input[type="checkbox"]:checked::after {
        font-size: 12px;
    }
}
