/**
 * Lotus QR Tickets - Frontend Styles
 * 
 * @package LotusQRTickets
 * @since 1.0.0
 */

/* My Tickets Page */
.lotus-my-tickets {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.lotus-my-tickets h2 {
    margin-bottom: 20px;
    color: #333;
}

/* No Tickets State */
.lotus-no-tickets {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lotus-no-tickets p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Filter Tabs */
.lotus-tickets-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.lotus-tickets-filter .filter-tab {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
}

.lotus-tickets-filter .filter-tab:hover {
    background: #f0f0f0;
}

.lotus-tickets-filter .filter-tab.active {
    background: #0073aa;
    color: #fff;
}

/* Date Headers */
.lotus-date-header {
    background: #0073aa;
    color: #fff;
    padding: 10px 15px;
    margin: 20px 0 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* Ticket Items */
.lotus-ticket-item {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.lotus-ticket-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lotus-ticket-item.status-used {
    opacity: 0.7;
    background: #f9f9f9;
}

.lotus-ticket-item.status-expired,
.lotus-ticket-item.status-cancelled {
    opacity: 0.5;
    background: #f5f5f5;
}

.ticket-qr-section {
    padding: 15px;
    text-align: center;
    background: #f9f9f9;
    border-right: 1px solid #eee;
}

.ticket-qr-image {
    width: 100px;
    height: 100px;
    display: block;
    margin-bottom: 8px;
}

.ticket-code {
    display: block;
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

.ticket-info-section {
    flex: 1;
    padding: 15px 20px;
}

.ticket-attraction {
    margin: 0 0 5px;
    font-size: 18px;
    color: #0073aa;
}

.ticket-type {
    margin: 0 0 10px;
    color: #666;
}

.ticket-time {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ticket-status-section {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    min-width: 120px;
}

.ticket-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge-unused {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-used {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-cancelled {
    background: #e5e7eb;
    color: #374151;
}

.ticket-used-at {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* Download Section */
.lotus-tickets-download {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.lotus-tickets-download .download-button {
    margin: 5px;
}

/* Login Required */
.lotus-login-required {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lotus-login-required .button {
    margin: 5px;
}

/* Scanner Interface */
.lotus-scan-interface {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.lotus-scan-interface h2 {
    text-align: center;
    margin-bottom: 10px;
}

.scan-location {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.scan-input-section {
    margin-bottom: 30px;
}

.scan-input-section .input-group {
    display: flex;
    gap: 10px;
}

.scan-input-section input[type="text"] {
    flex: 1;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-transform: uppercase;
    font-family: monospace;
}

.scan-input-section input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
}

.scan-input-section button {
    padding: 15px 30px;
    font-size: 16px;
}

/* Scan Results */
.scan-result {
    margin-bottom: 30px;
}

.scan-result.hidden {
    display: none;
}

.result-card {
    border-radius: 8px;
    overflow: hidden;
}

.result-card .result-status {
    padding: 30px;
    text-align: center;
    color: #fff;
}

.result-card.result-valid .result-status {
    background: #00a32a;
}

.result-card.result-invalid .result-status,
.result-card.result-error .result-status {
    background: #d63638;
}

.result-card.result-used .result-status {
    background: #dba617;
}

.result-card .status-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.result-card .status-text {
    font-size: 20px;
    font-weight: 600;
}

.result-card .result-details {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
}

.result-card .result-details p {
    margin: 8px 0;
}

.scanning {
    text-align: center;
    padding: 30px;
    background: #f0f0f0;
    border-radius: 8px;
    color: #666;
}

/* Scan History */
.scan-history h3 {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.scan-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f9f9f9;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 4px solid #ddd;
}

.history-item.history-valid {
    border-left-color: #00a32a;
}

.history-item.history-invalid {
    border-left-color: #d63638;
}

.history-code {
    font-family: monospace;
    font-weight: bold;
}

.history-attraction {
    color: #666;
    flex: 1;
    margin: 0 15px;
}

.history-time {
    color: #888;
    font-size: 12px;
}

/* Ticket Lookup */
.lotus-ticket-lookup {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.lotus-ticket-lookup .input-group {
    display: flex;
    gap: 10px;
}

.lotus-ticket-lookup input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-transform: uppercase;
}

.lookup-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
}

.lookup-result.result-valid {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.lookup-result.result-used {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.lookup-result.result-invalid,
.lookup-result.result-expired,
.lookup-result.result-not_found {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.lookup-result .result-message {
    font-weight: 600;
    margin-bottom: 15px;
}

.lookup-result .ticket-info {
    margin: 0;
}

.lookup-result .ticket-info dt {
    font-weight: 600;
    color: #666;
    margin-top: 10px;
}

.lookup-result .ticket-info dd {
    margin: 0;
}

/* Order Tickets Section */
.lotus-qr-order-tickets {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.lotus-qr-order-tickets h2 {
    margin-bottom: 20px;
}

.lotus-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.lotus-ticket-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.lotus-ticket-card .ticket-qr {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
}

.lotus-ticket-card .ticket-qr img {
    width: 120px;
    height: 120px;
}

.lotus-ticket-card .ticket-details {
    padding: 15px;
}

.lotus-ticket-card .ticket-details p {
    margin: 5px 0;
}

.lotus-ticket-card .ticket-code {
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.lotus-ticket-card .ticket-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.lotus-ticket-card .ticket-status.status-unused {
    background: #d1fae5;
    color: #065f46;
}

.lotus-ticket-card .ticket-status.status-used {
    background: #fef3c7;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .lotus-ticket-item {
        flex-direction: column;
    }
    
    .ticket-qr-section {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .ticket-status-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .scan-input-section .input-group {
        flex-direction: column;
    }
    
    .lotus-tickets-grid {
        grid-template-columns: 1fr;
    }
}
