/* ================================================== 
                    EVENT TICKETS
   ================================================== 
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background: #ffffff;
    color: #111111;
}

/* ================================================== 
                        HEADER
   ==================================================  
*/
header {
    background: #000000;
    color: #ffffff;
    border-bottom: 6px solid #ffffff;
}

.header-content {
    padding: 20px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
}

header p {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
}

button {
    border: 2px solid #000000;
    border-radius: 100px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

button:hover {
    transform: translateY(-2px);
}

#login-button {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

#login-button:hover {
    background: #000000;
    color: #ffffff;
}

/* Logo and title displayed together on the left side of the header */
.header-brand {
    display: flex;

    align-items: center;
    gap: 18px;
}


/* Jim's Event Tickets logo */
.header-logo {
    width: 200px;
    height: auto;

    display: block;
}


/* Header title and tagline */
.header-title {
    display: flex;

    flex-direction: column;
    justify-content: center;
}


.header-title h1 {
    margin: 0;
}


.header-title p {
    margin: 4px 0 0;
}

/* ================================================== 
                        HERO
   ==================================================  
*/
main {
    margin: 0;
}

.hero {
    min-height: 470px;
    padding: 100px max(8%, 35px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.90) 0%,
            rgba(0, 0, 0, 0.70) 35%,
            rgba(0, 0, 0, 0.25) 60%,
            rgba(0, 0, 0, 0.05) 100%
        ),
        url("images/jims_stadium.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}


/* .hero::after {
    content: "JET";
    position: absolute;
    right: -20px;
    bottom: -90px;
    font-size: 300px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.045);
    pointer-events: none;
} */

.hero .eyebrow {
    color: #ffffff !important;
}

.hero h2 {
    max-width: 800px;
    margin: 10px 0 18px;
    font-size: clamp(52px, 8vw, 100px);
    line-height: 0.9;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -5px;
}

.hero > p:last-child {
    max-width: 580px;
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
    color: #d1d1d1;
}

.eyebrow {
    margin: 0;
    font-size: 13px !important;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ================================================== 
                        EVENTS
   ==================================================  
*/
.events-section {
    max-width: 1300px;
    margin: auto;
    padding: 85px 35px 110px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 40px;
}

.section-heading .eyebrow {
    color: #666666;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
}

#refresh-button {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

#refresh-button:hover {
    background: #ffffff;
    color: #000000;
}

/* ================================================== 
                        EVENT CARDS
   ==================================================  
*/
.event-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.event-card {
    min-height: 390px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    border: 2px solid #000000;
    border-radius: 24px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow:
        8px 8px 0 #000000;
}

.event-card h3 {
    margin: 0 0 14px;
    font-size: 27px;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
}

.event-description {
    margin: 0;
    color: #555555;
    line-height: 1.5;
}

.event-details {
    margin-top: 25px;
    display: grid;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.price {
    margin-top: auto;
    padding-top: 28px;
    font-size: 32px;
    font-weight: 900;
}

.status {
    width: fit-content;
    margin-top: 12px;
    padding: 7px 13px;
    border-radius: 100px;
    background: #000000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

.status.cancelled {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

/* ================================================== 
                        MESSAGES
   ==================================================  
*/
#loading {
    padding: 30px 0;
    font-size: 18px;
    font-weight: 700;
}

#error-message {
    margin-bottom: 30px;
    font-weight: 700;
}

/* ================================================== 
                        FOOTER
   ==================================================  
*/
footer {
    padding: 55px 30px;
    background: #000000;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================== 
                        MOBILE
   ==================================================  
*/

@media (max-width: 700px) {
    .header-content {
        padding: 20px;
    }

    header h1 {
        font-size: 21px;
    }

    header p {
        font-size: 9px;
    }

    #login-button {
        padding: 10px 16px;
    }

    .hero {
        min-height: 420px;
        padding:
            70px
            20px;
    }

    .hero h2 {
        letter-spacing: -3px;
    }

    .hero::after {
        font-size: 180px;
        bottom: -45px;
    }

    .events-section {
        padding:
            60px
            20px
            80px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================== 
                        EVENT MODAL
   ==================================================  
*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    background:
        rgba(0, 0, 0, 0.75);
    overflow-y: auto;
}

.modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 650px;
    padding: 45px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 24px;
    box-shadow:
        10px 10px 0 #000000;
}

.modal-content h2 {
    margin:
        10px
        50px
        15px
        0;
    font-size: 42px;
    line-height: 1;
    text-transform: uppercase;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 45px;
    height: 45px;
    padding: 0;
    background: #000000;
    color: #ffffff;
    font-size: 26px;
}

.modal-event-details {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.modal-event-details p {
    padding: 18px;
    margin: 0;
    background: #f2f2f2;
    border-radius: 12px;
}

.ticket-purchase {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #000000;
}

.modal-price {
    margin-top: 5px;
    font-size: 36px;
    font-weight: 900;
}

.quantity-container {
    display: grid;
    gap: 7px;
}

.quantity-container label {
    font-size: 12px;
    font-weight: 900;

    text-transform: uppercase;
}

#ticket-quantity {
    min-width: 140px;

    padding: 12px;

    border: 2px solid #000000;
    border-radius: 8px;

    background: #ffffff;

    font-size: 16px;
}

.buy-button {
    width: 100%;
    margin-top: 30px;
    padding: 18px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 16px;
}

.buy-button:hover {
    background: #ffffff;
    color: #000000;
}

.view-event-button {
    width: 100%;
    margin-top: 20px;
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.view-event-button:hover {
    background: #ffffff;
    color: #000000;
}

#purchase-message {
    margin-bottom: 0;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 700px) {
    .modal {
        padding: 15px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 32px;
    }

    .modal-event-details {
        grid-template-columns: 1fr;
    }

    .ticket-purchase {
        align-items: stretch;
        flex-direction: column;
    }

    #ticket-quantity {
        width: 100%;
    }
}

.ticket-button {
    display: block;
    margin-top: 15px;
    padding: 16px 20px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 100px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.ticket-button:hover {
    background: #ffffff;
    color: #000000;
}

#buy-button.unavailable {
    background: #d6d6d6;
    color: #777777;
    border-color: #d6d6d6;
    cursor: not-allowed;
    opacity: 0.8;
}

#buy-button.unavailable:hover {
    background: #d6d6d6;
    color: #777777;
    border-color: #d6d6d6;
    transform: none;
}

.hidden {
    display: none !important;
}

.organiser-button {
    padding: 12px 20px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 100px;
    font-weight: 900;
    cursor: pointer;
}

.organiser-button:hover {
    background: #000000;
    color: #ffffff;
}

/* ================================================== 
                ORGANISER DASHBOARD
   ==================================================  
*/
.organiser-dashboard {
    padding:
        70px
        clamp(30px, 8vw, 140px);
    background: #ffffff;
    color: #000000;
    min-height: 500px;
}

.organiser-dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 50px;
}

.organiser-dashboard-header h2 {
    margin: 5px 0 0;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 900;
    letter-spacing: -2px;
}

.section-label {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 3px;
}

.primary-button {
    padding: 16px 24px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 100px;
    font-weight: 900;
    cursor: pointer;
}

.primary-button:hover {
    background: #ffffff;
    color: #000000;
}

.organiser-modal {
    max-width: 650px;
}

#create-event-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

#create-event-form label {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

#create-event-form input,
#create-event-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #000000;
    border-radius: 10px;
    box-sizing: border-box;
    font: inherit;
}

#create-event-form textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.create-submit-button {
    margin-top: 20px;
    width: 100%;
}

.form-message {
    min-height: 20px;
    margin: 10px 0 0;
    font-weight: 800;
}

#organiser-events {
    display: grid;
    gap: 18px;
}

.organiser-event-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 28px;
    background: #f4f4f4;
    border: 2px solid #000000;
    border-radius: 20px;
}

.organiser-event-info {
    flex: 1;
}

.organiser-event-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.organiser-event-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.organiser-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    color: #555555;
}

.organiser-event-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.edit-event-button {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

.edit-event-button:hover {
    background: #000000;
    color: #ffffff;
}

.cancel-event-button {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.cancel-event-button:hover {
    background: #ffffff;
    color: #000000;
}

.cancel-event-button:disabled {
    background: #d6d6d6;
    color: #777777;
    border-color: #d6d6d6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 850px) {
    .organiser-event-card {
        align-items: stretch;
        flex-direction: column;
    }

    .organiser-event-actions {
        width: 100%;
    }

    .organiser-event-actions button {
        flex: 1;
    }
}