/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
h1, h2, h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin: 2rem 0;
    color: var(--primary-color);
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* Container and Layout */
.container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.nav-links a {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
    margin-bottom: 0.5rem;
    text-align: center;
}

.nav-links a:hover {
    background-color: var(--dark-color);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Forms */
form {
    margin-bottom: 2rem;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    margin-top: 1rem;
}

button:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    width: 100%;
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 0.5rem 0;
}

.card-footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Reservation List */
.reservations-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

.reservation-item {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.reservation-details {
    flex: 1;
    margin-bottom: 1rem;
}

.reservation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.reservation-id {
    font-weight: bold;
    color: var(--primary-color);
}

.reservation-license {
    font-style: italic;
}

.reservation-dates {
    color: var(--dark-color);
    font-size: 0.9rem;
}

/* Messages */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

#registrationMessage, 
#createReservationMessage {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

#auth-status {
    text-align: center;
    padding: 1rem;
    margin: 1rem 0;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: var(--border-radius);
}

/* Media Queries for Responsive Design */
@media (min-width: 768px) {
    .form-row {
        flex-direction: row;
        gap: 1rem;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    .card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    button {
        width: auto;
    }
    
    .reservation-item {
        flex-direction: row;
        align-items: center;
    }
    
    .reservation-details {
        margin-bottom: 0;
    }
    
    .reservation-actions {
        justify-content: flex-end;
    }
    
    .card-footer {
        justify-content: flex-end;
    }
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
        margin: 1.5rem 0;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links a {
        width: 100%;
    }
    
    .btn-extend, .btn-remove {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    input[type="datetime-local"] {
        font-size: 0.9rem;
    }
}

/* Existing styles for buttons and modals */
.reservation-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-extend, .btn-remove {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-extend {
    background-color: var(--secondary-color);
    color: white;
}

.btn-extend:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.btn-remove {
    background-color: var(--danger-color);
    color: white;
}

.btn-remove:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 500px;
    margin: 10% auto;
    padding: 2rem;
    position: relative;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: var(--transition);
}

.close:hover {
    color: var(--danger-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.required {
    color: var(--danger-color);
}

.customer-info {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: var(--border-radius);
}

.customer-info div {
    margin-bottom: 0.25rem;
}

.reservation-spot {
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Paid Plan Promotion Styles */
#paidPlanPromotion {
    border: 2px solid #ffc107;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#paidPlanPromotion:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#paidPlanPromotion .card-header {
    background-color: #ffc107;
    color: #212529;
    font-weight: bold;
    border-bottom: none;
}

#paidPlanPromotion .card-body {
    padding: 20px;
}

#paidPlanPromotion ul {
    padding-left: 20px;
}

#paidPlanPromotion li {
    margin-bottom: 10px;
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

#paidPlanPromotion li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

#paidPlanPromotion .card-footer {
    background-color: #f8f9fa;
    border-top: none;
    text-align: center;
    padding: 15px;
}

/* Button Link Style */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0069d9;
    text-decoration: none;
    color: white;
}

/* Pricing Section Styles */
.pricing-section {
    margin: 3rem 0;
    text-align: center;
}

.pricing-section h2 {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: none;
}

.pricing-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.pricing-table th, 
.pricing-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid #eee;
}

.pricing-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.pricing-table tr:nth-child(even) {
    background-color: rgba(52, 152, 219, 0.05);
}

.pricing-table .feature-name {
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
}

.pricing-table .check {
    color: var(--success-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.pricing-table .cross {
    color: var(--danger-color);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Paid tier styling */
.pricing-table .paid-tier {
    font-weight: bold;
}

.pricing-table .price {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    font-weight: normal;
    opacity: 0.8;
}

.pricing-cta {
    margin-top: 2rem;
    text-align: center;
}

.pricing-cta .btn {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
}

/* Mobile-specific styles for pricing table */
@media (max-width: 767px) {
    .pricing-table th, 
    .pricing-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .pricing-table .feature-name {
        font-size: 0.9rem;
    }
    
    .pricing-section h2 {
        font-size: 1.5rem;
    }
    
    .pricing-table .price {
        font-size: 0.8rem;
    }
}

/* Analytics Styles */
.analytics-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-metric {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    text-align: center;
}

.analytics-metric h3 {
    margin-top: 0;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.analytics-chart {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.analytics-chart h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.progress-container {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--success-color);
    width: 0;
    transition: width 0.5s ease;
}

.progress-labels {
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
}

/* Media query for desktop */
@media (min-width: 768px) {
    .analytics-summary {
        flex-direction: row;
    }
    
    .analytics-metric {
        flex: 1;
    }
}

/* Parking Spot Management Styles */
.spots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.spot-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.spot-card:hover {
    transform: scale(1.05);
}

.spot-management {
    margin-bottom: 15px;
}

#spotManagementForm {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#newSpotNumber {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#addSpotButton, #removeSpotButton {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#removeSpotButton {
    background-color: #f44336;
}

#toggleSpotManagement {
    padding: 8px 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#toggleSpotInput {
    padding: 5px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

/* Contrast button for better visibility */
.contrast-button {
    background-color: #2196F3 !important;
    color: white !important;
    font-weight: bold;
    border: none !important;
}

.contrast-button:hover:not(:disabled) {
    background-color: #0b7dda !important;
}

.contrast-button:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
}

/* Disabled select styling */
.disabled-select {
    background-color: #f0f0f0;
    color: #666666;
    cursor: not-allowed;
    border: 1px solid #cccccc;
}

/* Adjust the parking spot dropdown and input */
#parkingSpotDropdown {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 200px;
}

option[style*="color: blue"] {
    background-color: #e6f2ff;
}

option[style*="color: red"] {
    background-color: #ffe6e6;
}

/* Checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
}

.footer {
   position: static;
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: white;
   color: black;
   text-align: center;
}