@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
    --ticket-red: #d11218;
    --ticket-bg: #f4f5f9;
    --ticket-text: #1a1a1a;
    --font-mono: 'Roboto Mono', monospace;
}

.ticket-standalone-view {
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* Outer Red Wrapper */
.ticket-wrapper {
    position: relative;
    width: 800px;
    height: 340px;
    background-color: var(--ticket-red);
    padding: 15px;
    box-sizing: border-box;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: var(--font-mono);
}

/* Inner White Ticket */
.ticket-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--ticket-bg);
    display: flex;
    overflow: hidden;
}

/* Ticket Cutouts (using pseudo elements) */
.ticket-inner::before,
.ticket-inner::after {
    content: '';
    position: absolute;
    left: 140px; /* Aligned with the divider line */
    width: 30px;
    height: 30px;
    background-color: var(--ticket-red);
    border-radius: 50%;
    z-index: 10;
    transform: translateX(-50%);
}

.ticket-inner::before {
    top: -15px;
}

.ticket-inner::after {
    bottom: -15px;
}

/* Left Section: Barcode */
.ticket-left {
    width: 140px;
    height: 100%;
    border-right: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.barcode-container {
    transform: rotate(-90deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
}

.barcode-container img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.barcode-text {
    font-size: 0.6rem;
    color: #666;
    margin-top: 5px;
    letter-spacing: 2px;
}

/* Right Section: Content */
.ticket-right {
    flex: 1;
    padding: 25px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header */
.tr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tr-meta-top {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ticket-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tr-logo {
    display: flex;
    align-items: center;
}

.tr-logo img {
    height: 35px;
    width: auto;
}

/* Body / Main Text */
.tr-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.tr-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ticket-text);
    margin-bottom: 0.5rem;
}

.tr-attendee {
    font-size: 1.2rem;
    font-weight: 500;
    color: #444;
}

.tr-venue {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ticket-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.tr-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tr-hashtag {
    color: var(--ticket-red);
}

/* Action Bar */
.action-bar {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
}

.btn-download {
    background-color: var(--ticket-red);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(209, 18, 24, 0.4);
}

.btn-download:hover {
    background-color: #a80e13;
}

/* Mobile Vertical Ticket Redesign */
@media (max-width: 850px) {
    #ticket-visual {
        transform: none !important;
        margin: 0 auto 2rem auto !important;
        width: 100% !important;
        max-width: 380px !important;
        height: auto !important;
        padding: 15px;
        border-radius: 16px;
        box-shadow: 0 15px 35px rgba(209, 18, 24, 0.3) !important;
    }
    
    .ticket-inner {
        flex-direction: column;
        border-radius: 10px;
    }

    /* Hide desktop vertical cutouts */
    .ticket-inner::before,
    .ticket-inner::after {
        display: none;
    }

    /* Move Info to Top */
    .ticket-right {
        order: 1;
        padding: 2rem 1.5rem;
    }

    /* Stack header neatly */
    .tr-header {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 1.5rem;
        width: 100%;
    }

    .tr-logo img {
        height: 45px;
    }

    .tr-meta-top {
        font-size: 0.9rem;
        text-align: center;
        line-height: 1.5;
    }

    /* Title & Body */
    .tr-body {
        margin-bottom: 2.5rem;
    }

    .tr-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .tr-attendee {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .tr-venue {
        font-size: 0.85rem;
        background: var(--ticket-text);
        color: white;
        padding: 0.6rem 1rem;
        border-radius: 6px;
        display: inline-block;
        margin-top: 1.5rem;
    }

    /* Footer / Metadata */
    .tr-footer {
        flex-direction: column;
        gap: 1rem;
        background: #eaecef;
        padding: 1rem;
        border-radius: 8px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .tr-meta-bottom {
        line-height: 1.5;
    }

    .tr-hashtag {
        text-align: center !important;
        font-size: 1rem;
    }

    /* Move Barcode to Bottom and make horizontal */
    .ticket-left {
        order: 2;
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 2px dashed #ccc;
        padding: 2.5rem 1.5rem;
    }

    /* Add horizontal cutouts for mobile */
    .ticket-left::before, 
    .ticket-left::after {
        content: '';
        position: absolute;
        top: -15px;
        width: 30px;
        height: 30px;
        background-color: var(--ticket-red);
        border-radius: 50%;
        z-index: 10;
    }
    
    .ticket-left::before { left: -15px; }
    .ticket-left::after { right: -15px; }

    .barcode-container {
        transform: none;
        width: 100%;
    }

    .barcode-container img {
        height: 80px;
    }
    
    .barcode-text {
        font-size: 0.8rem;
        margin-top: 10px;
        font-weight: 700;
        letter-spacing: 3px;
    }
}
