/* =================================================================
   JULES RENTAL - Cinematic UI
   ================================================================= */

/* -- Full-width section ------------------------------------------ */
.jules-rental-wrap {
    width: 100%;
    min-height: 100vh;
    background: #000;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(247,247,38,.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 10% 80%,  rgba(247,247,38,.03) 0%, transparent 60%);
    color: #fff;
    box-sizing: border-box;
}

/* -- Centered container ------------------------------------------ */
.jules-rental-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 85px 32px 96px;
    box-sizing: border-box;
}

/* -- Page title -------------------------------------------------- */
.jules-rental-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    text-align: center;
    margin: 0 0 12px; 
}

.jules-rental-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #f7f726;
    border-radius: 2px;
    margin: 18px auto 0;
}

/* -- App root ---------------------------------------------------- */
.jules-rental-app {
    margin-top: 2rem;
}

/* -- Status message ---------------------------------------------- */
.jules-rental-message {
    font-size: 1.05rem;
    color: #888;
    text-align: center;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.jules-rental-message p { margin: 0; }

/* -- Actions row ------------------------------------------------- */
.jules-rental-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* -- Timer badge ------------------------------------------------- */
.jules-rental-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(247,247,38,.08);
    border: 1px solid rgba(247,247,38,.28);
    color: #f7f726;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
}

.jules-rental-timer::before {
    content: '\23F1';
    font-size: 0.85rem;
}

/* -- Rent / primary button --------------------------------------- */
.jules-rental-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f7f726;
    color: #000;
    padding: 18px 52px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 28px rgba(247,247,38,.3);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.jules-rental-button:hover {
    background: #e6e61f;
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(247,247,38,.4);
}

.jules-rental-button:disabled {
    background: #222;
    color: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* -- Video player ------------------------------------------------ */
.jules-rental-player {
    position: relative;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    height: 0;
    background: #080808;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.06),
        0 32px 80px rgba(0,0,0,.8),
        0 0 120px rgba(247,247,38,.04);
}

.jules-rental-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* -- Utility ----------------------------------------------------- */
.jules-rental-hidden { display: none !important; }

/* -- Agreement modal --------------------------------------------- */
.jules-rental-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.jules-rental-modal-content {
    background: #111;
    border: 1px solid rgba(255,255,255,.08);
    max-width: 560px;
    width: 100%;
    padding: 48px;
    border-radius: 16px;
    text-align: left;
    color: #fff;
    box-shadow: 0 40px 100px rgba(0,0,0,.7);
    animation: jrModalIn .25s ease both;
}

@keyframes jrModalIn {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.jules-rental-modal-content p {
    margin-bottom: 28px;
    line-height: 1.75;
    font-size: 0.975rem;
    color: #bbb;
}

.jules-rental-modal-content label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #ccc;
}

.jules-rental-modal-content input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #f7f726;
    cursor: pointer;
}

.jules-rental-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Cancel button */
.jules-rental-button--secondary,
#jules-rental-cancel {
    background: rgba(255,255,255,.07);
    color: #ccc;
    border: 1px solid rgba(255,255,255,.1);
    padding: 13px 26px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background .2s;
    margin: 0;
}

.jules-rental-button--secondary:hover,
#jules-rental-cancel:hover {
    background: rgba(255,255,255,.13);
}

/* Confirm / start watching */
.jules-rental-button--primary,
#jules-rental-confirm {
    background: #f7f726;
    color: #000;
    border: none;
    padding: 13px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    transition: background .2s, transform .15s;
    margin: 0;
}

.jules-rental-button--primary:hover:not(:disabled),
#jules-rental-confirm:hover:not(:disabled) {
    background: #e6e61f;
    transform: translateY(-1px);
}

#jules-rental-confirm:disabled {
    background: #222;
    color: #555;
    cursor: not-allowed;
    transform: none;
}

/* =================================================================
   LOGIN / REGISTER STATE
   ================================================================= */

.jules-rental-login {
    max-width: 1000px;
    margin: 2.5rem auto 0;
    background: #0c0c0c;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,.6);
}

/* Top intro banner */
.jules-rental-login > h2 {
    background: linear-gradient(135deg, #0e0e00 0%, #0d0d0d 100%);
    border-bottom: 1px solid rgba(247,247,38,.12);
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    color: #999;
    padding: 22px 40px;
    margin: 0;
    letter-spacing: 0.02em;
}

/* WooCommerce wrapper reset */
.jules-rental-login .woocommerce {
    padding: 0;
    background: transparent;
}

.jules-rental-login .woocommerce-notices-wrapper { display: none; }

/* Neutralise WooCommerce clearfix pseudo-elements on col2-set.
   Without this they become unwanted grid items causing extra gaps. */
.jules-rental-login .col2-set::before,
.jules-rental-login .col2-set::after {
    content: none !important;
    display: none !important;
}

/* Two-column grid
   Override WooCommerce: .col2-set .col-1 { float:left; width:48% }  */
.jules-rental-login #customer_login.col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: start;
    width: 100% !important;
    float: none !important;
    overflow: hidden;
}

/* Kill WooCommerce floats and fixed widths on both columns */
.jules-rental-login #customer_login .col-1,
.jules-rental-login #customer_login .col-2,
.jules-rental-login .u-column1,
.jules-rental-login .u-column2 {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box;
}

.jules-rental-login .u-column1 {
    padding: 52px 48px;
    border-right: 1px solid rgba(255,255,255,.05);
}

.jules-rental-login .u-column2 {
    padding: 52px 48px;
    background: rgba(255,255,255,.015);
}

/* Column headings */
.jules-rental-login .u-column1 h2,
.jules-rental-login .u-column2 h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
}

.jules-rental-login .u-column1 h2::after,
.jules-rental-login .u-column2 h2::after {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: #f7f726;
    border-radius: 2px;
    margin-top: 10px;
    margin-bottom: 32px;
}

.jules-rental-login .u-column2 h2::after {
    opacity: .45;
}

/* Form row spacing */
.jules-rental-login .woocommerce-form-row,
.jules-rental-login .form-row {
    margin-bottom: 18px;
}

/* Labels */
.jules-rental-login label,
.jules-rental-login .woocommerce-form__label:not(.woocommerce-form__label-for-checkbox) {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #777;
    margin-bottom: 8px;
}

.jules-rental-login label .required {
    color: #f7f726;
    font-weight: 700;
}

.jules-rental-login .screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Text / email / password inputs
   !important overrides WooCommerce's default white background */
.jules-rental-login input[type="text"],
.jules-rental-login input[type="email"],
.jules-rental-login input[type="password"],
.jules-rental-login .woocommerce-Input--text {
    width: 100% !important;
    padding: 13px 16px !important;
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, background .2s;
}

.jules-rental-login input[type="text"]:focus,
.jules-rental-login input[type="email"]:focus,
.jules-rental-login input[type="password"]:focus {
    border-color: rgba(247,247,38,.5) !important;
    background: rgba(247,247,38,.04) !important;
}

/* Remember-me checkbox row */
.jules-rental-login .woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: #777;
    cursor: pointer;
    margin-bottom: 0;
}

.jules-rental-login .woocommerce-form__input-checkbox {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: #f7f726;
    cursor: pointer;
}

/* Submit - Login column (solid yellow) */
.jules-rental-login .u-column1 button[type="submit"],
.jules-rental-login .u-column1 .woocommerce-button {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 15px;
    background: #f7f726;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 22px rgba(247,247,38,.25);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.jules-rental-login .u-column1 button[type="submit"]:hover,
.jules-rental-login .u-column1 .woocommerce-button:hover {
    background: #e6e61f;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(247,247,38,.35);
}

/* Submit - Register column (same solid yellow as Login) */
.jules-rental-login .u-column2 button[type="submit"],
.jules-rental-login .u-column2 .woocommerce-Button {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 15px;
    background: #f7f726;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 22px rgba(247,247,38,.25);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.jules-rental-login .u-column2 button[type="submit"]:hover,
.jules-rental-login .u-column2 .woocommerce-Button:hover {
    background: #e6e61f;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(247,247,38,.35);
}

/* Info paragraph (register column) */
.jules-rental-login .u-column2 form > p:not([class]) {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* Privacy policy text */
.jules-rental-login .woocommerce-privacy-policy-text {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.65;
    margin-bottom: 18px;
}

.jules-rental-login .woocommerce-privacy-policy-text a {
    color: #f7f726;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Lost password */
.jules-rental-login .woocommerce-LostPassword {
    margin-top: 16px;
    text-align: center;
}

.jules-rental-login a,
.jules-rental-login .woocommerce-LostPassword a {
    color: #f7f726;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.85rem;
    transition: opacity .2s;
}

.jules-rental-login a:hover,
.jules-rental-login .woocommerce-LostPassword a:hover {
    opacity: .7;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

@media (max-width: 900px) {
    .jules-rental-login #customer_login.col2-set {
        grid-template-columns: 1fr !important;
    }

    .jules-rental-login .u-column1 {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.06);
        padding: 40px 32px;
    }

    .jules-rental-login .u-column2 {
        padding: 40px 32px;
    }
}

@media (max-width: 768px) {
    .jules-rental-inner {
        padding: 100px 20px 64px;
    }

    .jules-rental-title {
        font-size: 2.2rem;
    }

    .jules-rental-login > h2 {
        padding: 18px 24px;
        font-size: 0.9rem;
    }

    .jules-rental-button {
        padding: 16px 36px;
        font-size: 1rem;
    }

    .jules-rental-timer {
        font-size: 0.875rem;
        padding: 9px 18px;
    }

    .jules-rental-modal-content {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .jules-rental-inner {
        padding: 90px 16px 56px;
    }

    .jules-rental-login .u-column1,
    .jules-rental-login .u-column2 {
        padding: 32px 20px;
    }

    .jules-rental-modal-actions {
        flex-direction: column;
    }

    .jules-rental-modal-actions button {
        width: 100%;
        text-align: center;
    }
}

/* =================================================================
   ACTIVE RENTAL HEADER - Title (left) + Timer (right)
   Uses display:contents on the app wrapper so its children
   participate directly in the parent CSS Grid.
   ================================================================= */

.jules-rental-inner:has(.jules-rental-app) {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 40px;
}

/* Dissolve the app wrapper into the grid */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-app {
    display: contents;
}

/* Title - left column, row 1 */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-title {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
    margin-bottom: 0;
}

/* Left-align the yellow underline bar */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-title::after {
    margin: 14px 0 0;
}

/* Status message - left column, row 2 */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-message {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    margin: 2px 0 0;
    font-size: 0.9rem;
}

/* Timer / actions - right column, row 1 (aligns with title) */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    margin-bottom: 0;
}

/* Player - full width, row 3 */
.jules-rental-inner:has(.jules-rental-app) .jules-rental-player {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 36px 0 0;
}

/* Modal is position:fixed - grid placement is irrelevant */

/* -- Mobile: collapse to single column, stack top-to-bottom ------ */
@media (max-width: 768px) {
    .jules-rental-inner:has(.jules-rental-app) {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .jules-rental-inner:has(.jules-rental-app) .jules-rental-title {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
    }

    .jules-rental-inner:has(.jules-rental-app) .jules-rental-title::after {
        margin: 14px auto 0;
    }

    .jules-rental-inner:has(.jules-rental-app) .jules-rental-actions {
        grid-column: 1;
        grid-row: 2;
        justify-content: center;
        margin: 0;
    }

    .jules-rental-inner:has(.jules-rental-app) .jules-rental-message {
        grid-column: 1;
        grid-row: 3;
        text-align: center;
        margin: 0;
    }

    .jules-rental-inner:has(.jules-rental-app) .jules-rental-player {
        grid-column: 1;
        grid-row: 4;
        margin-top: 24px;
    }
}

/* =================================================================
   PRE-RENTAL STATE - logged in but no active rental/player
   Center the title + CTA row vertically so the page does not
   look empty. Detected by the absence of a visible player.
   ================================================================= */

.jules-rental-wrap:not(:has(.jules-rental-player:not(.jules-rental-hidden))) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) {
    align-content: center;
    row-gap: 20px;
    min-height: 60vh;
}

/* Scale the title up slightly for the hero feel */
.jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-title {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
}

/* Make the message a softer subtitle */
.jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-message {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* -- Mobile: keep it centered and readable ----------------------- */
@media (max-width: 768px) {
    .jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) {
        min-height: 50vh;
        row-gap: 16px;
    }

    .jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-title {
        font-size: 2.4rem;
        text-align: center;
    }

    .jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-title::after {
        margin: 12px auto 0;
    }

    .jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-message {
        text-align: center;
        grid-column: 1;
        grid-row: 2;
    }

    .jules-rental-inner:has(.jules-rental-app):not(:has(.jules-rental-player:not(.jules-rental-hidden))) .jules-rental-actions {
        grid-column: 1;
        grid-row: 3;
        justify-content: center;
    }
}
