/* Tickets specific styling - Ultra Premium NCRTC DLS */

.tickets-page {
    padding: 0 !important; /* override default page layout padding */
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header with Dot Motif */
.page-header {
    padding: 3rem 2rem 5rem 2rem;
    position: relative;
    border-radius: 0 0 40px 40px;
    margin-bottom: -40px;
    overflow: hidden;
    background: var(--primary-blue-gradient);
    box-shadow: 0 10px 30px rgba(10, 49, 97, 0.2);
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.header-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.header-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.header-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 1;
    animation: slideBg 60s linear infinite;
}

@keyframes slideBg {
    0% { background-position: 0 0; }
    100% { background-position: 400px 400px; }
}

/* Main Panel Setup */
.main-panel {
    margin: 0 2rem;
    position: relative;
    z-index: 5;
    border: none;
    box-shadow: 0 20px 50px rgba(6, 29, 58, 0.08);
}

.ticket-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    padding: 1rem;
}

/* Modern Form Elements */
.modern-form {
    margin-top: 1.5rem;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.input-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    z-index: 2;
}

.select-wrapper select {
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: #F8FAFC;
    transition: var(--transition);
    appearance: none;
    cursor: pointer;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(10, 49, 97, 0.1);
}

.swap-btn {
    position: absolute;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-soft);
    color: var(--secondary-orange);
    transition: var(--transition);
}

.swap-btn:hover {
    background: var(--secondary-orange);
    color: white;
    border-color: var(--secondary-orange);
    transform: translateY(-50%) rotate(180deg);
}

/* Radio Cards */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: #F8FAFC;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-muted);
}

.card-content i {
    font-size: 1.5rem;
}

.radio-card input:checked + .card-content {
    border-color: var(--primary-blue);
    background: rgba(10, 49, 97, 0.03);
    color: var(--primary-blue);
}

.radio-card input[value="premium"]:checked + .card-content {
    border-color: var(--secondary-orange);
    background: rgba(243, 108, 33, 0.03);
    color: var(--secondary-orange);
}

.shadow-glow-large {
    box-shadow: 0 10px 25px rgba(10, 49, 97, 0.3);
    padding: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

/* Authentic Namo Bharat E-Ticket Card Redesign */
.namo-e-ticket-card {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(6, 29, 58, 0.15);
    border: 1px solid var(--border-subtle);
    margin-top: 2rem;
    position: relative;
    text-align: left;
}

.ticket-header-strip {
    height: 8px;
    background: var(--secondary-orange-gradient);
}

.ticket-footer-strip {
    height: 6px;
    background: var(--primary-blue-gradient);
}

.ticket-top-banner {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.ticket-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ticket-brand img {
    height: 38px;
    border-radius: 6px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text .title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-dark);
    line-height: 1.1;
}

.brand-text .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.active-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.active-badge .dot-pulse {
    width: 6px;
    height: 6px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ticket-body-content {
    padding: 1.5rem;
    background-image: radial-gradient(rgba(10, 49, 97, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.ticket-id-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.id-group {
    display: flex;
    flex-direction: column;
}
.id-group.text-right { text-align: right; }

.id-group .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.id-group strong {
    font-size: 0.95rem;
    font-family: monospace;
    color: var(--primary-dark);
}

.ticket-route-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border: 1px dashed var(--border-subtle);
}

.route-point {
    flex: 1;
}

.route-point:last-child {
    text-align: right;
}

.route-point .st-code {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.route-point .st-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.route-connector {
    flex: 0.5;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.route-connector .line {
    position: absolute;
    top: 50%;
    left: -20%;
    right: -20%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border-subtle), var(--border-subtle) 4px, transparent 4px, transparent 8px);
    transform: translateY(-50%);
    z-index: 1;
}

.route-connector .train-icon {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.meta-box {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meta-box .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
}

.meta-box .value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.class-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--primary-dark);
    color: white;
}
.class-pill.premium {
    background: var(--secondary-orange);
}

.qr-section-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.qr-scanner-section {
    position: relative;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    max-width: 220px;
    box-shadow: 0 10px 25px rgba(10, 49, 97, 0.1);
    border: 1px solid var(--border-subtle);
}

.qr-corners {
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 2px solid transparent;
    background: 
      linear-gradient(to right, var(--primary-blue) 4px, transparent 4px) 0 0,
      linear-gradient(to bottom, var(--primary-blue) 4px, transparent 4px) 0 0,
      linear-gradient(to left, var(--primary-blue) 4px, transparent 4px) 100% 0,
      linear-gradient(to bottom, var(--primary-blue) 4px, transparent 4px) 100% 0,
      linear-gradient(to right, var(--primary-blue) 4px, transparent 4px) 0 100%,
      linear-gradient(to top, var(--primary-blue) 4px, transparent 4px) 0 100%,
      linear-gradient(to left, var(--primary-blue) 4px, transparent 4px) 100% 100%,
      linear-gradient(to top, var(--primary-blue) 4px, transparent 4px) 100% 100%;
    background-repeat: no-repeat;
    background-size: 15px 15px;
    z-index: 10;
    pointer-events: none;
}

.qr-scanner-section img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

.scan-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.8);
    animation: scanMove 3s ease-in-out infinite alternate;
    z-index: 5;
    border-radius: 4px;
}

@keyframes scanMove {
    0% { top: 5%; }
    100% { top: 95%; }
}

.scan-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.5rem;
}

.ticket-actions .btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Right Sidebar: Commuter Passes & History */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.section-heading h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.view-all {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}
.view-all:hover {
    text-decoration: underline;
}

.passes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pass-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.pass-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(10, 49, 97, 0.2);
}

.pass-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.bg-blue-light { background: rgba(10, 49, 97, 0.1); }
.bg-orange-light { background: rgba(243, 108, 33, 0.1); }
.bg-cyan-light { background: rgba(0, 201, 255, 0.1); }

.pass-content {
    flex: 1;
}

.pass-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.pass-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.arrow-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.pass-card:hover .arrow-icon {
    color: var(--primary-blue);
    transform: translateX(3px);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.history-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.bg-green-light {
    background: rgba(34, 197, 94, 0.1);
}

.history-details {
    flex: 1;
}

.history-route {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.history-route i {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.history-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-status {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

/* Responsive */
@media (max-width: 1024px) {
    .ticket-layout {
        grid-template-columns: 1fr;
    }
    
    .swap-btn {
        top: -1.2rem;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }
    .swap-btn:hover {
        transform: translateX(-50%) rotate(270deg);
    }
    
    .input-row {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .main-panel {
        margin: 0;
        border-radius: 20px 20px 0 0;
    }
    .page-header {
        padding: 2rem 1.5rem 4rem 1.5rem;
    }
    .ticket-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .ticket-actions {
        flex-direction: column;
    }
}

