/**
 * GetNth Custom CSS
 * Additional styles for interactive elements
 */

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.getnth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.getnth-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.getnth-modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.wallet-form .form-group {
    margin-bottom: 1.25rem;
}

.wallet-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.wallet-form input,
.wallet-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.wallet-form input:focus,
.wallet-form select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.getnth-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.getnth-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Swipe Card Styles
   ========================================================================== */
.swipe-card {
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.swipe-card:active {
    cursor: grabbing;
}

.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.like-indicator {
    right: 2rem;
    background: var(--success);
    color: var(--white);
    border: 3px solid var(--white);
}

.pass-indicator {
    left: 2rem;
    background: var(--danger);
    color: var(--white);
    border: 3px solid var(--white);
}

/* ==========================================================================
   Time Slot Selected State
   ========================================================================== */
.time-slot.selected {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
}

/* ==========================================================================
   Phone Screen Content
   ========================================================================== */
.phone-app-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 2.5rem 1rem 1rem;
}

.phone-app-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.phone-app-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
}

.phone-app-content {
    padding: 1rem;
}

.phone-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.phone-action {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.625rem;
    color: var(--gray-700);
}

.phone-action-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.phone-event-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.phone-event-image {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.phone-event-content {
    padding: 0.75rem;
}

.phone-event-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.phone-event-meta {
    font-size: 0.625rem;
    color: var(--gray-500);
}

.phone-bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.phone-nav-item {
    text-align: center;
    font-size: 0.5rem;
    color: var(--gray-500);
}

.phone-nav-item.active {
    color: var(--primary);
}

.phone-nav-icon {
    font-size: 1rem;
}

/* ==========================================================================
   Archive Pages
   ========================================================================== */
.archive-header {
    padding: 6rem 0 3rem;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.archive-title {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.archive-description {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Single Event/Restaurant Page
   ========================================================================== */
.single-header {
    position: relative;
    height: 400px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
}

.single-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.single-header-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    padding: 2rem;
    width: 100%;
}

.single-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.single-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.single-content {
    padding: 3rem 0;
}

.single-sidebar {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

/* ==========================================================================
   Trip Board Styles
   ========================================================================== */
.trip-timeline {
    margin-top: 2rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.timeline-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

.timeline-status.confirmed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.timeline-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.timeline-status.voting {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* ==========================================================================
   Group Chat Styles (Preview)
   ========================================================================== */
.chat-preview {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-height: 400px;
}

.chat-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.chat-info h4 {
    margin: 0;
    font-size: 1rem;
}

.chat-info span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-messages {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 80%;
}

.chat-message.sent {
    align-self: flex-end;
}

.chat-message.received {
    align-self: flex-start;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

.chat-message.sent .message-bubble {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-message.received .message-bubble {
    background: var(--white);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message-sender {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.625rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
    text-align: right;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .phone-mockup {
        width: 240px;
        height: 500px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .wallet-balance {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .single-title {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Hover Effects
   ========================================================================== */
.card:hover .card-image {
    transform: scale(1.05);
}

.card .card-image {
    transition: transform 0.3s ease;
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   Ticketmaster Integration Styles
   ========================================================================== */
.city-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.city-tab {
    transition: all 0.2s ease;
}

.city-tab.active {
    transform: scale(1.05);
}

.category-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.category-btn.active {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
}

.ticketmaster-event .event-image img {
    transition: transform 0.3s ease;
}

.ticketmaster-event:hover .event-image img {
    transform: scale(1.05);
}

.ticketmaster-events-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 640px) {
    .ticketmaster-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ticketmaster-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Uber Ride Comparison Styles
   ========================================================================== */
.ride-location-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-xl);
}

.ride-location-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.ride-card {
    position: relative;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ride-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ride-card.recommended {
    border-color: var(--success);
    background: var(--white);
}

.ride-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    background: var(--success);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.ride-badge.surge {
    background: var(--warning);
    left: auto;
    right: 1rem;
    transform: none;
}

.ride-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gray-200);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.ride-card:hover .ride-icon {
    transform: scale(1.1);
}

.ride-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ride-provider {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.ride-time {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.ride-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.ride-eco {
    font-size: 0.75rem;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.ride-book-btn {
    margin-top: 0.75rem;
    width: 100%;
}

.ride-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .ride-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ride-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .cta-section,
    .mobile-nav {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .phone-mockup {
        display: none;
    }
}
