/* EV Charging Complaint Management System - Consumer Page Styles */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --accent-color: #2196F3;
    --accent-dark: #1976D2;
    --accent-light: #BBDEFB;
    --red: #F44336;
    --red-light: #FFEBEE;
    --yellow: #FFC107;
    --yellow-light: #FFF8E1;
    --green: #4CAF50;
    --green-light: #E8F5E9;
    --purple: #9C27B0;
    --purple-light: #F3E5F5;
    --gray-100: #f7f7f7;
    --gray-200: #e6e6e6;
    --gray-300: #d5d5d5;
    --gray-400: #b0b0b0;
    --gray-500: #909090;
    --gray-600: #707070;
    --gray-700: #505050;
    --gray-800: #303030;
    --gray-900: #202020;
    --gradient: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.text-center {
    text-align: center;
}

.text-gray {
    color: var(--gray-600);
}

.highlight-text {
    color: var(--accent-color);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.25);
}

.btn-primary {
    color: white;
    background: var(--gradient);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--gray-700);
    background-color: white;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    color: var(--accent-color);
    background-color: transparent;
    border: 1px solid var(--accent-color);
}

.btn-outline:hover {
    color: white;
    background-color: var(--accent-color);
}

.btn-danger {
    color: white;
    background-color: var(--red);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background-color: #d32f2f;
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-container {
    padding: 1.5rem;
}

.form-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-row > .form-group {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.form-group.half {
    flex: 0 0 50%;
    max-width: 50%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    color: var(--gray-800);
    background-color: white;
    border-color: var(--accent-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.25);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Consumer Page Layout */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.consumer-nav {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-icon-sm {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 0.5rem;
    color: var(--gray-800);
}

.nav-link {
    color: var(--accent-color);
    font-weight: 500;
}

.consumer-hero {
    background: var(--gradient);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.consumer-hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.consumer-hero p {
    font-size: 1.125rem;
    max-width: 36rem;
    margin: 0 auto;
}

.complaint-container {
    max-width: 1000px;
    margin: 2rem auto 4rem;
}

/* Two-column Layout */
.complaint-layout {
    display: flex;
    gap: 2rem;
    margin: 2rem 0 4rem;
}

.complaint-form-column {
    flex: 3;
}

.complaint-help-column {
    flex: 2;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.complaint-card-container {
    overflow: hidden;
}

/* Complaint Tabs */
.complaint-tabs {
    display: flex;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.complaint-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.complaint-tab.active {
    color: var(--primary-color);
    background-color: white;
}

.complaint-tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.complaint-tab:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Complaint Section */
.complaint-content {
    padding: 2rem;
}

.complaint-section {
    animation: fadeIn 0.3s ease;
}

.complaint-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--gray-800);
}

/* QR Scanner Styles */
.qr-scanner-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.qr-scanner-viewport {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    background-color: black;
}

#qrVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.qr-scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.4);
}

.qr-scanner-line {
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 3px;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    animation: scanLine 2s linear infinite;
}

.qr-status {
    padding: 1rem;
    background-color: white;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.qr-controls {
    padding: 1rem;
    display: flex;
    justify-content: center;
    background-color: white;
}

/* Simplified Charger Info Display */
.charger-info-display {
    background-color: var(--green-light);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    animation: fadeIn 0.3s ease;
}

.charger-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.charger-title {
    font-weight: 600;
    color: var(--gray-700);
}

.info-value {
    font-weight: 500;
    color: var(--primary-color);
}

/* Help Card Styles */
.help-card {
    position: sticky;
    top: 2rem;
}

.help-header {
    padding: 1.25rem;
    background-color: var(--primary-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.help-header h2 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-content {
    padding: 1.5rem;
}

/* Step Styles */
.help-step {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.help-step:not(:last-child):after {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 3rem;
    bottom: -1rem;
    width: 2px;
    background-color: var(--gray-200);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-right: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.step-content p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.step-image {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 0.75rem;
    border: 1px solid var(--gray-200);
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
}

.step-options {
    display: flex;
    align-items: center;
    margin-top: 0.75rem;
}

.step-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    flex: 1;
}

.step-option i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.step-option span {
    font-size: 0.85rem;
    color: var(--gray-700);
    font-weight: 500;
}

.step-divider {
    margin: 0 0.75rem;
    font-weight: bold;
    color: var(--gray-500);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 20;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 32rem;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-500);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Confirmation Message */
.confirmation-message {
    text-align: center;
    padding: 1.5rem 0;
}

.confirmation-icon {
    font-size: 3rem;
    color: var(--green);
    margin-bottom: 1rem;
}

.tracking-info {
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

/* Footer Styles */
.consumer-footer {
    background-color: var(--gray-800);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-logo i {
    margin-right: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    max-width: 24rem;
    animation: fadeIn 0.3s ease forwards;
    border-left: 4px solid var(--accent-color);
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--red);
}

.toast.warning {
    border-left-color: var(--yellow);
}

.toast-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.toast-icon.success {
    color: var(--green);
}

.toast-icon.error {
    color: var(--red);
}

.toast-icon.warning {
    color: var(--yellow);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gray-400);
    cursor: pointer;
    margin-left: 0.5rem;
}

.toast.fading {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s, transform 0.3s;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scanLine {
    0% {
        top: calc(50% - 100px);
    }
    50% {
        top: calc(50% + 100px);
    }
    100% {
        top: calc(50% - 100px);
    }
}

/* Responsive styles */
@media (max-width: 992px) {
    .complaint-layout {
        flex-direction: column;
    }
    
    .complaint-form-column,
    .complaint-help-column {
        width: 100%;
    }
    
    .help-card {
        position: static;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
    }

    .form-group.half {
        max-width: 100%;
    }

    .modal-content {
        margin: 1rem;
    }
}

/* Additional styles for tracking functionality */

/* Track Complaint Section */
.tracking-intro {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
}

.tracking-form {
    margin-bottom: 2rem;
}

.tracking-result-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.tracking-header h3 {
    margin: 0;
    color: var(--gray-800);
}

.tracking-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.complaint-card {
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--gray-200);
}

.complaint-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.complaint-card-header {
    padding: 1rem;
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.complaint-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.complaint-id {
    font-weight: 500;
}

.complaint-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.complaint-card-content {
    padding: 1rem;
}

.complaint-card-footer {
    padding: 0.75rem 1rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: right;
}

.detail-row {
    display: flex;
    margin-bottom: 0.5rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 500;
    color: var(--gray-600);
    width: 5rem;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
}

/* Timeline Styles */
.consumer-tracking-timeline {
    position: relative;
    margin: 20px 0;
    padding: 0;
}

.consumer-tracking-timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: var(--gray-200);
    z-index: 0;
}

.consumer-timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
}

.consumer-timeline-item:last-child {
    margin-bottom: 0;
}

.consumer-timeline-item.completed .consumer-timeline-icon:after {
    content: '';
    position: absolute;
    top: 40px;
    left: 18px;
    height: calc(100% + 20px);
    width: 4px;
    background: var(--green);
    z-index: 0;
}

.consumer-timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    background: white;
    border: 4px solid var(--gray-300);
    z-index: 1;
}

.consumer-timeline-icon.blue {
    border-color: var(--accent-color);
}

.consumer-timeline-icon.green {
    border-color: var(--green);
}

.consumer-timeline-icon.yellow {
    border-color: var(--yellow);
}

.consumer-timeline-icon.red {
    border-color: var(--red);
}

.consumer-timeline-icon i {
    font-size: 20px;
    color: var(--gray-700);
}

.consumer-timeline-content {
    background: var(--gray-50);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.consumer-timeline-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.consumer-timeline-date {
    color: var(--gray-500);
    font-size: 12px;
    margin-bottom: 10px;
}

.consumer-timeline-description {
    color: var(--gray-700);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.status-badge.red {
    background-color: var(--red-light);
    color: var(--red);
}

.status-badge.yellow {
    background-color: var(--yellow-light);
    color: var(--yellow);
}

.status-badge.green {
    background-color: var(--green-light);
    color: var(--green);
}

.status-badge.blue {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

/* Tracking Modal */
.tracking-id {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tracking-status {
    margin-bottom: 1.5rem;
}

/* Helper classes */
.mt-2 {
    margin-top: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}