.sw-ticket {
    padding: 0;
    padding-top: 12px;
}

.sw-ticket-print-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

.sw-ticket-header {
    margin-bottom: 8px;
    padding-left: 16px;
    padding-right: 16px;
}

.sw-ticket-title {
    font-weight: 700;
}

.sw-ticket-help {
    font-size: 0.9em;
    opacity: 0.8;
}

.sw-ticket-group {
    margin: 12px 0;
}

.sw-ticket-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.sw-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sw-ticket-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    border-radius: var(--sw-radius);
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    position: relative;
}

.sw-ticket-barcode {
    justify-self: start;
}

.sw-ticket-barcode img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 240px;
    border-radius: var(--sw-radius);
    max-height: 270px;
    object-fit: contain;
}

.sw-ticket-code {
    display: none;
}

.sw-ticket-info {
    min-width: 0;
}

.sw-ticket-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.sw-ticket-event {
    font-weight: 700;
    min-width: 0;
    word-break: break-word;
    font-size: 1.15em;
}

.sw-ticket-number {
    flex: 0 0 auto;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.sw-ticket-type {
    word-break: break-word;
}

.sw-ticket-logo {
    position: absolute;
    right: 12px;
    bottom: 12px;
    max-width: 250px;
}

.sw-ticket-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 250px;
    object-fit: contain;
}

@media (min-width: 521px) {
    .sw-ticket-info {
        padding-right: 270px;
    }
}

.sw-ticket-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.sw-ticket-email {
    word-break: break-word;
    margin-bottom: 6px;
}

.sw-ticket-phone {
    word-break: break-word;
    margin-bottom: 6px;
}

.sw-ticket-date {
    word-break: break-word;
    margin-bottom: 6px;
}

.sw-ticket-date:empty {
    display: none;
}

.sw-ticket-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.sw-ticket-amount {
    font-weight: 600;
}

@media (max-width: 520px) {
    .sw-ticket-card {
        grid-template-columns: 1fr;
    }
    .sw-ticket-barcode {
        max-width: 260px;
    }
}

@media print {
    .sw-ticket-print-page {
        max-width: none;
        padding: 12px;
    }
    .sw-ticket-card {
        width: 95%;
        margin: 0 auto;
        max-width: none;
        border-radius: 0;
    }
    .sw-ticket-actions {
        display: none;
    }
}

/* Full-page template */
.sw-ticket-page {
    padding: 0;
}
.sw-ticket-full {
    border: 1px solid #e0e0e0;
    background: #ffffff;
    border-radius: var(--sw-radius);
    padding: 16px;
    box-sizing: border-box;
    max-width: 900px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sw-ticket-full-header {
    margin-bottom: 12px;
}
.sw-ticket-full-logo-top {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.sw-ticket-full-logo-top img {
    display: block;
    width: 360px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.sw-ticket-full-titlebar {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: var(--sw-radius);
    padding: 10px 12px;
    box-sizing: border-box;
    text-align: center;
}
.sw-ticket-full-title {
    font-weight: 700;
    margin-bottom: 4px;
}
.sw-ticket-full-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
}
.sw-ticket-full-eventname {
    font-weight: 700;
    font-size: 1.8em;
}
.sw-ticket-full-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
    align-items: start;
}
.sw-ticket-full-numlabel {
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 6px;
}
.sw-ticket-full-num {
    font-weight: 700;
    font-size: 1.2em;
    word-break: break-word;
}
.sw-ticket-qr-wrap {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}
.sw-ticket-qr-img {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: var(--sw-radius);
}
.sw-ticket-full-row {
    margin-bottom: 6px;
    word-break: break-word;
}
.sw-ticket-full-label {
    font-weight: 600;
    opacity: 0.8;
    margin-right: 6px;
}
.sw-ticket-full-hint {
    margin-top: 10px;
    font-size: 0.9em;
    opacity: 0.8;
}
.sw-ticket-full-date:empty {
    display: none;
}
.sw-ticket-full-barcode-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 120px;
    overflow: hidden;
}
.sw-ticket-full-barcode {
    display: block;
    width: 50%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    image-rendering: auto;
}
.sw-ticket-full-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sw-ticket-full-logo {
    display: flex;
    justify-content: flex-end;
}
.sw-ticket-full-logo img {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
@media (max-width: 720px) {
    .sw-ticket-full-grid { grid-template-columns: 1fr; }
}
@media print {
    .sw-ticket-page { break-after: page; page-break-after: always; }
    .sw-ticket-full { width: 95%; margin: 0 auto; max-width: none; border-radius: 0; min-height: 10.2in; }
}
