/* Event Tickets Styles */

.ets-ticket-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ets-event-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.ets-event-title {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: bold;
}

.ets-event-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.ets-event-info-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.ets-event-info-item strong {
    color: #333;
    margin-right: 8px;
}

.ets-form-group {
    margin-bottom: 25px;
}

.ets-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ets-form-group input,
.ets-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.ets-form-group input:focus,
.ets-form-group select:focus {
    outline: none;
    border-color: #007cba;
}

.ets-quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Coupon code styling */
.ets-coupon-section {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ets-coupon-section input {
    flex: 1;
    margin: 0;
}

.ets-coupon-button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ets-coupon-button:hover {
    transform: translateY(-1px);
}

.ets-coupon-button:not(.ets-remove-coupon) {
    background: #007cba;
    color: white;
}

.ets-coupon-button:not(.ets-remove-coupon):hover {
    background: #005a87;
}

.ets-remove-coupon {
    background: #dc3545;
    color: white;
}

.ets-remove-coupon:hover {
    background: #c82333;
}

#coupon-message {
    margin-top: 10px;
}

/* Submit section - always visible */
.ets-submit-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.ets-submit-button {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.ets-submit-button:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.ets-submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ets-success {
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 4px;
    font-size: 14px;
}

.ets-error {
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    font-size: 14px;
}

/* Total display styling */
.ets-total-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.ets-total-display > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 16px;
}

.ets-total-display > div:last-child {
    margin-bottom: 0;
}

.ets-total-line {
    font-weight: bold;
    font-size: 18px !important;
    color: #2c3e50;
    border-top: 1px solid #dee2e6;
    padding-top: 8px;
    margin-top: 8px !important;
}

#discount-row {
    color: #28a745;
    font-weight: 600;
}

.ets-quantity-selector select {
    width: auto;
    min-width: 80px;
}

.ets-payment-section {
    border-top: 1px solid #e1e5e9;
    padding-top: 25px;
    margin-top: 25px;
}

.ets-payment-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

#card-element {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    transition: border-color 0.3s ease;
}

#card-element.StripeElement--focus {
    border-color: #007cba;
}

#card-errors {
    color: #dc3545;
    margin-top: 8px;
    font-size: 14px;
}

/* Submit button styles already defined above in .ets-submit-section */

.ets-messages {
    margin-bottom: 20px;
}

.ets-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.ets-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

/* User Tickets Styles */

.ets-user-tickets {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ets-ticket-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 25px;
    border-left: 4px solid #007cba;
}

.ets-ticket-header {
    display: flex;
    justify-content: between;
    align-items: start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.ets-ticket-event-name {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.ets-ticket-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ets-status-completed {
    background: #d4edda;
    color: #155724;
}

.ets-status-pending {
    background: #fff3cd;
    color: #856404;
}

.ets-status-refunded {
    background: #f8d7da;
    color: #721c24;
}

.ets-ticket-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ets-ticket-detail {
    font-size: 14px;
    color: #666;
}

.ets-ticket-detail strong {
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.ets-ticket-codes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.ets-ticket-codes h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.ets-ticket-code {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 5px 5px 5px 0;
    display: inline-block;
    border: 1px solid #e1e5e9;
}

/* Admin Styles */

.ets-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ets-admin-table th,
.ets-admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.ets-admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.ets-admin-table tr:hover {
    background: #f8f9fa;
}

.ets-action-buttons {
    display: flex;
    gap: 8px;
}

.ets-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
}

.ets-btn-danger {
    background: #dc3545;
    color: white;
}

.ets-btn-warning {
    background: #ffc107;
    color: #212529;
}

.ets-btn-primary {
    background: #007cba;
    color: white;
}

/* Responsive Design */

@media (max-width: 768px) {
    .ets-ticket-form {
        margin: 10px;
        padding: 20px;
    }
    
    .ets-event-info {
        grid-template-columns: 1fr;
    }
    
    .ets-quantity-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ets-ticket-header {
        flex-direction: column;
    }
    
    .ets-ticket-details {
        grid-template-columns: 1fr;
    }
    
    .ets-action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .ets-admin-table {
        font-size: 12px;
    }
    
    .ets-admin-table th,
    .ets-admin-table td {
        padding: 8px 4px;
    }
}
