/**
 * Ticket Display Styles
 *
 * Styles for:
 * - [cs_my_tickets] shortcode
 * - [cs_thankyou] shortcode
 * - Ticket cards, grid, status badges
 *
 * @package CS_Baligalil
 * @since   1.3.0
 */

/* ========================================
   Admin Note
   ======================================== */

.cs-admin-note {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
}

/* ========================================
   My Tickets Container
   ======================================== */

.cs-my-tickets {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.cs-my-tickets h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
}

.cs-no-tickets {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 16px;
}

.cs-login-required {
    text-align: center;
    padding: 40px 20px;
}

.cs-login-required p {
    margin-bottom: 16px;
    color: #666;
    font-size: 16px;
}

/* ========================================
   Order Group
   ======================================== */

.cs-order-group {
    margin-bottom: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.cs-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f5f2;
    border-bottom: 1px solid #e8e0d8;
}

.cs-order-label {
    font-size: 14px;
    color: #666;
}

.cs-order-label strong {
    color: #333;
    font-family: monospace;
    font-size: 13px;
}

.cs-order-date {
    font-size: 13px;
    color: #888;
}

/* ========================================
   Tickets Grid
   ======================================== */

.cs-tickets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
}

@media (min-width: 640px) {
    .cs-tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Ticket Card
   ======================================== */

.cs-ticket-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8e0d8;
    border-radius: 10px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.cs-ticket-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cs-ticket-card[data-status="scanned"] {
    background: #f0f0f0;
}

.cs-ticket-card[data-status="cancelled"] {
    background: #fce4ec;
}

/* QR Code Section */
.cs-ticket-qr {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cs-ticket-qr-img {
    width: 100px;
    height: 100px;
    border-radius: 6px;
}

.cs-ticket-code {
    font-family: monospace;
    font-size: 10px;
    color: #999;
    letter-spacing: 0.5px;
}

/* Info Section */
.cs-ticket-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cs-ticket-activity {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.3;
}

.cs-ticket-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.cs-ticket-detail {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.cs-detail-label {
    color: #999;
    white-space: nowrap;
}

.cs-detail-value {
    color: #555;
    font-weight: 500;
}

/* Contact phone link */
.cs-contact-phone {
    color: #e8956b;
    text-decoration: none;
    margin-right: 6px;
    direction: ltr;
    unicode-bidi: embed;
}

.cs-contact-phone:hover {
    text-decoration: underline;
}

/* Footer (status + actions) */
.cs-ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0ebe6;
}

/* ========================================
   Status Badges
   ======================================== */

.cs-ticket-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.cs-status-valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.cs-status-scanned {
    background: #e3f2fd;
    color: #1565c0;
}

.cs-status-cancelled {
    background: #fce4ec;
    color: #c62828;
}

/* ========================================
   Action Buttons
   ======================================== */

.cs-ticket-actions {
    display: flex;
    gap: 6px;
}

.cs-btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    border: none;
    line-height: 1.4;
}

.cs-btn:hover {
    opacity: 0.85;
}

.cs-btn-view {
    background: #e8956b;
    color: #fff;
}

.cs-btn-view:hover {
    color: #fff;
}

.cs-btn-pdf {
    background: #f0ebe6;
    color: #666;
}

.cs-btn-pdf:hover {
    color: #555;
}

.cs-btn-primary {
    background: #e8956b;
    color: #fff;
    padding: 10px 24px;
    font-size: 15px;
    border-radius: 8px;
}

.cs-btn-primary:hover {
    color: #fff;
}

/* ========================================
   Thank You Page
   ======================================== */

.cs-thankyou {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.cs-order-not-found {
    text-align: center;
    padding: 60px 20px;
}

.cs-order-not-found h2 {
    font-size: 28px;
    font-weight: 700;
    color: #c62828;
    margin-bottom: 12px;
}

.cs-order-not-found p {
    font-size: 16px;
    color: #666;
}

.cs-thankyou-header {
    text-align: center;
    padding: 32px 20px;
}

.cs-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 32px;
    line-height: 64px;
    margin: 0 auto 16px;
}

.cs-thankyou-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.cs-order-number {
    font-size: 14px;
    color: #888;
}

.cs-order-number strong {
    font-family: monospace;
    color: #555;
}

.cs-thankyou-tickets h3 {
    font-size: 18px;
    font-weight: 500;
    color: #555;
    margin-bottom: 16px;
    padding: 0 4px;
}

.cs-thankyou-footer {
    text-align: center;
    padding: 24px 20px;
    margin-top: 16px;
    border-top: 1px solid #e8e0d8;
}

.cs-thankyou-footer p {
    color: #888;
    font-size: 14px;
    margin-bottom: 12px;
}

/* ========================================
   Responsive - Mobile
   ======================================== */

@media (max-width: 480px) {
    .cs-ticket-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cs-ticket-details {
        align-items: center;
    }

    .cs-ticket-footer {
        flex-direction: column;
        gap: 10px;
    }

    .cs-ticket-actions {
        width: 100%;
        justify-content: center;
    }

    .cs-order-header {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .cs-tickets-grid {
        padding: 12px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .cs-ticket-actions,
    .cs-thankyou-footer {
        display: none !important;
    }

    .cs-ticket-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }

    .cs-order-group {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
