/* BilletManager - Forbedret frontend billetvisning */

.billet-manager-tickets {
    margin: 0 auto 32px auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0 0 24px 0;
    font-family: 'Poppins', sans-serif;
    white-space: normal;
}

.billet-manager-title {
    font-size: 2em;
    font-weight: 500;
    color: #181c22;
    margin: 0px;
    padding: 18px 32px 18px 32px;
    border-bottom: 1px solid #ececec;
}

.billet-manager-ticket-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 8px;
    padding: 18px 32px 18px 32px;
    border-bottom: 1px solid #ececec;
    box-sizing: border-box;
    max-width: 100%;
}

.billet-manager-ticket-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.billet-manager-ticket-name {
    font-size: 1.2em;
    font-weight: 700;
    color: #181c22;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.billet-manager-ticket-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #181c22;
    margin-top: 2px;
}

.billet-manager-ticket-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    gap: 4px;
    flex-shrink: 0;
    width: max-content;
    max-width: 100%;
    text-align: right;
}

.billet-manager-quantity-stepper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.billet-manager-quantity-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #181c22;
    background: #fff;
    border-radius: 7px;
    font-size: 1.2em;
    color: #181c22;
    cursor: pointer;
    margin: 0 2px;
    transition: background 0.2s, border 0.2s;
}

.billet-manager-quantity-input {
    width: 38px;
    height: 32px;
    text-align: center;
    border: 1.5px solid #181c22;
    border-radius: 7px;
    font-size: 1.1em;
    color: #181c22;
    margin: 0 2px;
}

.billet-manager-ticket-quantity-label {
    font-size: 0.95em;
    color: #888;
    margin-top: 2px;
}

.billet-manager-ticket-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding: 18px 32px 0 32px;
}

.billet-manager-ticket-summary span {
    color: #888;
    font-size: 1.1em;
}

.billet-manager-ticket-summary b {
    color: #181c22;
    font-weight: 700;
}

.billet-manager-buy-btn {
    background: var(--billet-manager-add-to-cart-color, #ff6240);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 14px 32px;
    font-size: 1.1em;
    font-weight: 700;
    margin-left: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.billet-manager-buy-btn:hover {
    background: var(--billet-manager-add-to-cart-hover-color, #e04e2e);
}

.billet-manager-go-to-cart {
    background: var(--billet-manager-view-cart-color, #ff6240) !important;
    color: #fff;
    border: none;
    border-radius: 0px 0px 9px 9px;
    padding: 14px 32px;
    font-size: 1.1em;
    font-weight: 700;
    margin-top: 55px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    display: block;
    margin-bottom: -25px;
    text-align: center;
}

.billet-manager-go-to-cart:hover {
    background: var(--billet-manager-view-cart-hover-color, #e04e2e) !important;
}

.billet-manager-ticket-unavailable {
    text-align: center;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #475569;
    font-weight: 500;
    font-size: 1.1em;
}

.billet-manager-notice {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #475569;
    margin: 20px 0;
    font-size: 1.1em;
    border: 1px solid #e2e8f0;
}

.billet-manager-notice.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
    margin: 30px;
}

.billet-manager-notice.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

@media (max-width: 700px) {
    .billet-manager-tickets {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 16px 0;
    }
    .billet-manager-title {
        font-size: 1.3em;
        padding: 18px 10px 0 10px;
    }
    .billet-manager-ticket-row {
        padding: 16px 10px 8px 10px;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .billet-manager-ticket-controls {
        justify-self: end;
    }
    .billet-manager-ticket-quantity-label {
        text-align: right;
    }
    .billet-manager-ticket-summary {
        padding: 12px 10px 0 10px;
        gap: 10px;
    }
    .billet-manager-buy-btn {
        padding: 10px 16px;
        font-size: 1em;
        margin-left: 10px;
    }
}

/**
 * BilletManager Frontend Styles
 */

/* Konto side styling */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin-bottom: 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 12px 15px;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Mine Billetter side */
.woocommerce-account-my-tickets {
    max-width: 800px;
    margin: 0 auto;
}

.no-tickets {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-tickets p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.tickets-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.ticket-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.ticket-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.ticket-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

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

.ticket-status.valid {
    background: #d4edda;
    color: #155724;
}

.ticket-status.redeemed {
    background: #f8d7da;
    color: #721c24;
}

.ticket-details {
    margin-bottom: 20px;
}

.ticket-details p {
    margin: 8px 0;
    color: #555;
}

.ticket-details code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.ticket-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mine Events side */
.woocommerce-account-my-events {
    max-width: 800px;
    margin: 0 auto;
}

.no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-events p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.events-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.event-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.event-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.event-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.ticket-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.event-details {
    margin-bottom: 20px;
}

.event-details p {
    margin: 8px 0;
    color: #555;
}

.event-tickets {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.event-tickets h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.tickets-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.ticket-name {
    font-weight: 500;
    color: #333;
}

.event-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Generelle knapper */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.button:hover {
    background: #005a87;
    color: #fff;
}

.button.secondary {
    background: #6c757d;
}

.button.secondary:hover {
    background: #545b62;
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .ticket-header,
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ticket-actions,
    .event-actions {
        flex-direction: column;
    }
    
    .button {
        text-align: center;
    }
    
    .ticket-mini-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation {
        padding: 15px;
    }
    
    .ticket-item,
    .event-item {
        padding: 15px;
    }
}

/* Print styles */
@media print {
    .ticket-actions,
    .event-actions,
    .woocommerce-account .woocommerce-MyAccount-navigation {
        display: none;
    }
    
    .ticket-item,
    .event-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
} 