:root {
    --primary-color: #ffffff;
    --secondary-color: #F3B216;
    --accent-color: #F3B216;
    --text-color: #2e2d34;
    --light-text: #e56883;
    --background-color: #2e2d34;
    --white: #ffffff;
    --error-color: #ef4444;
    --success-color: #10b981;
    --border-color: #d1d5db;
    --hover-color: #dbeafe;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    /* Remove top space while keeping side/bottom padding */
    padding: 0 20px 20px;
}

/* Alternate payment method buttons */
#payVenmo, #payCashApp, #payPayPal, #payZelle, #payApple {
    background-color: #2e2d34;
    color: #e56883;
    border: 1px solid #e56883;
}
#payVenmo:hover, #payCashApp:hover, #payPayPal:hover, #payZelle:hover, #payApple:hover {
    background-color: #e56883;
    color: #2e2d34;
}

header {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
    padding: 20px 0 0;
    border-bottom: 2px solid var(--border-color);
}

/* Wilco logo */
.wm-logo {
    display: none;
    position: absolute;
    top: 25px;
    left: 10px;
    width: 70px;
    height: auto;
}


.logo-section {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px 0;
}

h1 {
    font-family: Futura, 'Trebuchet MS', Arial, sans-serif;
    color: var(--primary-color);
    font-size: 3.2rem;
    margin: 0;            /* no extra gap below */
    line-height: 1.15;    /* tighten space between wrapped lines */
    font-weight: normal;
}

h2 {
    font-family: Futura, 'Trebuchet MS', Arial, sans-serif;
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin-bottom: 5px;
    font-weight: normal;
}

.pink-text {
    color: var(--light-text);
    text-decoration: none;
}

/* Underline specifically for the email link and Instagram link */
a.pink-text[href^="mailto:"],
a.instagram-link {
    text-decoration: underline;
}

.header-contact {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--primary-color);
}

h3 {
    font-family: Futura, 'Trebuchet MS', Arial, sans-serif;
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #2e2d34;
    font-weight: normal;
}

.header-contact {
    color: var(--light-text);
    font-size: 0.95rem;
}

main {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.required {
    color: var(--error-color);
}

/* Time Note Styles */
.time-note {
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 6px 10px;
    background-color: rgba(230, 230, 230, 0.5);
    border-radius: 4px;
    display: inline-block;
}

/* Jersey Swap Styles */
#jerseySwapSection h3 {
    color: #2e2d34;
    margin-bottom: 10px;
}

#jerseySwapSection p {
    margin-bottom: 15px;
    color: #2e2d34;
}

.swap-option {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
}

.swap-option input[type="radio"] {
    margin-right: 10px;
}

.swap-option label {
    color: #2e2d34;
    font-weight: 500;
}

.swap-option:hover {
    background-color: #e9e9e9;
}

/* Jersey Upload Styles */
#jerseyImageUpload h4 {
    color: #2e2d34;
    margin: 20px 0 10px;
}

.jersey-upload-container {
    margin-top: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    border: 2px dashed var(--border-color);
}

.jersey-upload-area {
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.jersey-upload-area i {
    font-size: 40px;
    color: #2e2d34;
    margin-bottom: 10px;
}

.jersey-upload-area p {
    margin: 5px 0;
    color: #2e2d34;
}

.jersey-upload-area .browse-btn {
    background-color: #e56883;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 14px;
    transition: all 0.3s;
    border: 2px solid #e56883;
    box-sizing: border-box;
}

.jersey-upload-area .browse-btn:hover {
    background-color: #fff;
    color: #e56883;
}

.jersey-upload-area .upload-note {
    font-size: 12px;
    color: #2e2d34;
}

.jersey-preview {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: var(--white);
}

.jersey-preview-item {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: 5px;
    overflow: hidden;
}

.jersey-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jersey-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style Selection Grid */
.style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.style-option input[type="radio"] {
    display: none;
}

.style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.style-img {
    width: 160px;
    height: 200px; /* 4:5 aspect ratio where width is 4 and height is 5 */
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #f1f5f9;
    margin: 0 auto 10px;
}

.style-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.style-card:hover {
    border-color: var(--secondary-color);
}

.style-card:hover .style-img img {
    transform: scale(1.05);
}

.style-option input[type="radio"]:checked + .style-card {
    border-color: var(--primary-color);
    border-width: 3px;
    box-shadow: 0 0 10px rgba(46, 45, 52, 0.3);
    transform: translateY(-3px);
    transition: all 0.3s ease;
    background-color: var(--hover-color);
}

.photo-count {
    display: block;
    font-size: 0.8rem;
    color: #e56883;
}

.enlarge-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.enlarge-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.jersey-demo img {
    cursor: pointer;
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-inner {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-label {
    background-color: var(--success-color);
}

input:checked + .toggle-label .toggle-inner {
    transform: translateX(30px);
}

.toggle-switch-text {
    position: absolute;
    font-size: 12px;
    width: 100px;
    color: var(--text-color);
}

.toggle-switch-text.yes {
    left: 70px;
    display: none;
}

.toggle-switch-text.no {
    left: 70px;
}

input:checked ~ .toggle-switch-text.yes {
    display: block;
}

input:checked ~ .toggle-switch-text.no {
    display: none;
}

/* File Upload Area */
.upload-container {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.upload-container.dragover {
    border-color: var(--secondary-color);
    background-color: var(--hover-color);
}

.upload-area {
    padding: 30px 0;
}

.upload-area i {
    font-size: 3rem;
    color: #2e2d34;
    margin-bottom: 15px;
}

.upload-area p {
    margin-bottom: 15px;
    color: #2e2d34;
}

#browseBtn {
    background-color: #e56883;
    color: white;
    border: 2px solid #e56883;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#browseBtn:hover {
    background-color: white;
    color: #e56883;
    border: 2px solid #e56883;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--error-color);
    font-size: 16px;
}

.upload-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #2e2d34;
}

.photo-requirements {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 4px;
    border-left: 3px solid var(--secondary-color);
}

.price-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #2e2d34; /* dark button color */
    color: #e56883; /* pink text */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Custom Select Styling */
.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-color);
    pointer-events: none;
}

/* Order Summary Section */
.summary-section {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.summary-items {
    font-size: 1.05rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.summary-item.total {
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: none;
    color: #2e2d34;
}

/* Turnaround buttons */
.turnaround-btn {
    background-color: #2e2d34;
    color: #ffffff;
    border: 1px solid #e56883;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.turnaround-btn:hover {
    background-color: #e56883;
    color: #2e2d34;
}
.turnaround-btn.active {
    background-color: #e56883;
    color: #2e2d34;
}
.turnaround-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Jersey swap option buttons */
#jerseySwapOptions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
#jerseySwapOptions input[type="radio"] {
    display: none; /* hide default circle */
}
#jerseySwapOptions label {
    display: flex;
    align-items: center;
    background-color: #2e2d34;
    color: #ffffff;
    border: 1px solid #e56883;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
#jerseySwapOptions label:hover {
    background-color: #e56883;
    color: #2e2d34;
}
#jerseySwapOptions input[type="radio"]:checked + label {
    background-color: #e56883;
    color: #2e2d34;
}

/* Submit Button */
.submit-btn {
    background-color: #e56883;
    color: white;
    border: 2px solid #e56883;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
    box-sizing: border-box;
}

.submit-btn:hover {
    background-color: white;
    color: #e56883;
    border: 2px solid #e56883;
}

/* Disabled state */
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Back link button */
.link-btn {
    background: none;
    border: none;
    color: #e56883;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Secondary button – inverse colors of .submit-btn */
.secondary-btn {
    background-color: white;
    color: #e56883;
    border: 2px solid #e56883;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
    box-sizing: border-box;
}

.secondary-btn:hover {
    background-color: #e56883;
    color: white;
}

/* Jersey swap dropdown */
.styled-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    color: #2e2d34;
    font-size: 1rem;
    appearance: none;
}

.styled-select:disabled {
    background-color: #f3f4f6; /* light gray */
    color: #a1a1aa; /* medium gray text */
    border-color: var(--border-color);
    cursor: not-allowed;
}

.styled-select option {
    background-color: #ffffff;
    color: #2e2d34;
}

footer {
    display: block;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    text-align: center;
}

.image-modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.image-modal-content {
    display: inline-block;
    vertical-align: middle;
    max-width: 95%;
    max-height: 95%;
    background-color: transparent;
}

.enlarged-image-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.enlarged-image {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* Use the site background shade with transparency. This leaves the dark backdrop untouched
       while dimming lighter content inside the container. */
    background-color: rgba(46, 45, 52, 0.6); /* matches var(--background-color) with 60% opacity */
    overflow: auto;
    padding: 20px 10px;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 0 auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: modalFade 0.3s;
}

@keyframes modalFade {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--light-text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Larger close button for the image modal */
#closeImageBtn {
    font-size: 42px; 
    top: 10px;
    right: 20px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1010;
    cursor: pointer;
}

.close-button:hover {
    color: var(--text-color);
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .toggle-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .toggle-switch {
        margin-top: 10px;
    }
    
    .wm-logo {
        position: relative;
        top: 0;
        left: 0;
        width: 60px;
        margin: 10px auto 5px;
        display: block;
    }
}

@media (max-width: 480px) {
    .style-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    /* Smaller buttons on mobile */
    .submit-btn,
    .secondary-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    /* Prevent jersey swap demo image overflow */
    .jersey-demo,
    .jersey-demo img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
    }
    
    /* --- Additional mobile optimisations --- */
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    /* Reduce section spacing */
    .form-section {
        margin-bottom: 20px;
    }
    
    /* Style grid images */
    .style-img {
        width: 120px;
        height: 150px;
    }
    
    /* Smaller upload previews */
    .preview-item {
        width: 80px;
        height: 80px;
    }
    
    .jersey-preview-item {
        height: 120px;
    }
    
    input[type="text"],
    input[type="email"],
    select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    label {
        font-size: 0.9rem;
    }
}

/* ----- Desktop positioning for image modal ----- */
@media (min-width: 769px) {
    .image-modal {
        padding-top: 5vh; /* start a bit below the very top */
    }

    /* Disable the spacer used for legacy vertical centering */
    .image-modal:before {
        display: none;
    }

    /* Ensure content aligns to the top edge of the flex container */
    .image-modal-content {
        vertical-align: top;
    }
}

html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
}

/* Hide WebKit scrollbars just in case */
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

/* Center payment and thank-you modals on screen */
#paymentModal,
#thankYouScreen {
    justify-content: center; /* horizontal centering */
    align-items: center;     /* vertical centering */
}

#paymentModal .modal-content,
#thankYouScreen .modal-content {
    margin-bottom: 0; /* reset bottom offset */
}
