/**
 * DeWonder Quark Expeditions Demo - Styles
 */

/* General Section Styles */
.quark-demo-section {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.quark-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
}

.quark-info {
    background: #e0f2fe;
    border: 1px solid #0284c7;
    color: #075985;
    padding: 1rem;
    border-radius: 8px;
}

.quark-count {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.count-number {
    font-weight: 600;
    color: #1e293b;
}

/* Filter Bar */
.quark-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quark-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quark-filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.quark-filter-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Expeditions Grid */
.quark-expeditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.quark-expedition-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.quark-expedition-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.quark-expedition-card.hidden {
    display: none;
}

.expedition-region {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.expedition-region.ant {
    background: #dbeafe;
    color: #1e40af;
}

.expedition-region.arc {
    background: #dcfce7;
    color: #166534;
}

.expedition-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.expedition-destinations,
.expedition-highlights {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.expedition-destinations strong,
.expedition-highlights strong {
    color: #475569;
}

.expedition-highlights ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.expedition-highlights li {
    margin-bottom: 0.25rem;
}

.more {
    color: #3b82f6;
    font-weight: 500;
}

.expedition-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.expedition-id {
    color: #94a3b8;
    font-family: monospace;
}

.expedition-meta a {
    color: #3b82f6;
    text-decoration: none;
}

.expedition-meta a:hover {
    text-decoration: underline;
}

/* Ships Grid */
.quark-ships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quark-ship-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.ship-code {
    display: inline-block;
    background: #1e293b;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ship-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem;
}

.ship-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.ship-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.ship-id {
    color: #94a3b8;
    font-family: monospace;
}

.ship-meta a {
    color: #3b82f6;
    text-decoration: none;
}

/* Table Styles */
.quark-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.quark-departures-table,
.quark-cabins-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.quark-departures-table th,
.quark-cabins-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.quark-departures-table td,
.quark-cabins-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.quark-departures-table tr:last-child td,
.quark-cabins-table tr:last-child td {
    border-bottom: none;
}

.quark-departures-table tr:hover,
.quark-cabins-table tr:hover {
    background: #f8fafc;
}

.date-col {
    font-weight: 500;
    white-space: nowrap;
}

.expedition-col {
    max-width: 300px;
}

.ship-col {
    white-space: nowrap;
}

.ship-badge {
    display: inline-block;
    background: #1e293b;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.duration-col {
    white-space: nowrap;
}

.route-col {
    white-space: nowrap;
}

.view-details-btn {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
}

.view-details-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Departure Detail Styles */
.quark-departure-detail {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

.departure-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.departure-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem;
}

.departure-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.meta-item {
    font-size: 0.9rem;
    color: #64748b;
}

.meta-item strong {
    color: #475569;
}

/* Promotions */
.departure-promotions {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.departure-promotions h4 {
    margin: 0 0 1rem;
    color: #92400e;
    font-size: 1rem;
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

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

.promo-code {
    background: #92400e;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.promo-name {
    flex: 1;
    color: #78350f;
}

.promo-value {
    font-weight: 600;
    color: #92400e;
}

/* Cabins */
.departure-cabins {
    margin-bottom: 2rem;
}

.departure-cabins h4 {
    margin: 0 0 1rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.cabin-name-cell {
    font-weight: 500;
    background: #f8fafc;
}

.availability-cell {
    white-space: nowrap;
}

.availability-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.availability-badge.available {
    background: #dcfce7;
    color: #166534;
}

.availability-badge.limited {
    background: #fef3c7;
    color: #92400e;
}

.availability-badge.sold-out {
    background: #fee2e2;
    color: #991b1b;
}

.price-cell {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.promo-price-cell {
    white-space: nowrap;
}

.promo-price {
    color: #16a34a;
    font-weight: 600;
}

/* Options */
.departure-options {
    margin-bottom: 2rem;
}

.departure-options h4 {
    margin: 0 0 1rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.option-item.included {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.option-item.paid {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.option-name {
    color: #1e293b;
}

.option-price {
    font-weight: 600;
    color: #1e293b;
}

.option-included {
    color: #16a34a;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Raw Data */
.departure-raw-data {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.departure-raw-data summary {
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
}

.departure-raw-data summary:hover {
    color: #3b82f6;
}

.departure-raw-data pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .quark-expeditions-grid,
    .quark-ships-grid {
        grid-template-columns: 1fr;
    }

    .departure-meta-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .quark-departure-detail {
        padding: 1rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}
