/* ============================================================
   MayhemVideos — create.css
   Order Information page: toggle, drag-drop, form, payment
   ============================================================ */

/* ── Page layout ─────────────────────────────────────────── */
.mv-create-page {
    padding-top: var(--header-h);
    min-height: 100vh;
    background: var(--black);
}

.mv-create-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    /* Left preview: fixed 320px (~15% smaller); Right form: fills all remaining space */
    gap: 40px;
    align-items: start;
    padding: 48px 0 100px;
}

/* ── Hero preview panel ──────────────────────────────────── */
.mv-create-preview {
    position: sticky;
    top: calc(var(--header-h) + 24px);
}

.mv-preview-video {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--dark);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 100%;
    /* Portrait 9:16 aspect ratio */
    height: 0 !important;
    padding-bottom: 177.78% !important; /* 16 ÷ 9 × 100 */
}

@media (min-width: 1024px) {
    .mv-preview-video {
        /* Desktop: 9:16 fixed height for 320px column (320 × 16/9 ≈ 568px) */
        height: 568px !important;
        padding-bottom: 0 !important;
    }
}

.mv-preview-video video {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.mv-preview-video__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    padding: 20px;
    display: flex;
    align-items: flex-end;
}

.mv-preview-video__title {
    font-family: var(--font-head);
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--text);
}

/* ── Form panel ──────────────────────────────────────────── */
.mv-order-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Video type toggle ───────────────────────────────────── */
.mv-type-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    display: flex;
    gap: 4px;
}

.mv-type-toggle__btn {
    flex: 1;
    padding: 10px 8px;
    min-height: 44px;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    white-space: nowrap;
    line-height: 1.3;
}

.mv-type-toggle__btn:hover {
    color: var(--text);
    background: var(--surface-2);
}

.mv-type-toggle__btn.active {
    background: linear-gradient(135deg, var(--pink), #d004d4);
    color: #000;
    box-shadow: 0 2px 12px rgba(247, 141, 167, 0.3);
}

.mv-type-toggle__btn span {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
}

/* ── Section card ────────────────────────────────────────── */
.mv-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.mv-form-card__title {
    font-family: var(--font-head);
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mv-form-card__title span {
    font-size: 20px;
}

/* ── Form fields ─────────────────────────────────────────── */
.mv-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.mv-field:last-child {
    margin-bottom: 0;
}

.mv-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.mv-field label .required {
    color: var(--red);
    margin-left: 3px;
}

.mv-input {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    padding: 12px 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
    outline: none;
}

.mv-input:focus {
    border-color: rgba(247, 141, 167, 0.5);
    box-shadow: 0 0 0 3px rgba(247, 141, 167, 0.08);
}

.mv-input::placeholder {
    color: var(--text-faint);
}

textarea.mv-input {
    min-height: 100px;
    resize: vertical;
}

.mv-select {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    padding: 12px 16px;
    width: 100%;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color var(--transition);
}

.mv-select:focus {
    border-color: rgba(247, 141, 167, 0.5);
    outline: none;
}

/* Radio options */
.mv-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.mv-radio-option {
    position: relative;
}

.mv-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mv-radio-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    gap: 4px;
}

.mv-radio-option label .price-add {
    font-size: 11px;
    color: var(--text-faint);
    font-weight: 400;
}

.mv-radio-option input:checked+label {
    border-color: var(--pink);
    color: var(--pink);
    background: var(--pink-glow);
}

.mv-radio-option label:hover {
    border-color: rgba(247, 141, 167, 0.3);
    color: var(--text);
}

/* ── Drag & Drop Upload ───────────────────────────────────── */
.mv-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.mv-dropzone:hover,
.mv-dropzone.drag-over {
    border-color: rgba(247, 141, 167, 0.5);
    background: var(--pink-glow);
}

.mv-dropzone.has-file {
    border-color: rgba(0, 200, 60, 0.4);
    background: rgba(0, 200, 60, 0.04);
}

.mv-dropzone__icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.mv-dropzone__title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 6px;
}

.mv-dropzone__sub {
    font-size: 13px;
    color: var(--text-muted);
}

.mv-dropzone__sub span {
    color: var(--pink);
    text-decoration: underline;
}

.mv-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.mv-dropzone__preview {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mv-dropzone.has-file .mv-dropzone__default {
    display: none;
}

.mv-dropzone.has-file .mv-dropzone__preview {
    display: flex;
}

.mv-dropzone__thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--border);
}

.mv-dropzone__filename {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mv-dropzone__remove {
    font-size: 12px;
    color: var(--red);
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
}

/* Upload progress */
.mv-upload-progress {
    display: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.mv-upload-progress.active {
    display: block;
}

.mv-upload-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), #d004d4);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: mv-shimmer 1.5s infinite;
    background-size: 200% 100%;
}

/* ── Prompt section ──────────────────────────────────────── */
.mv-prompt-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mv-prompt-preset {
    font-size: 12px;
    padding: 8px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}

.mv-prompt-preset:hover {
    border-color: rgba(247, 141, 167, 0.4);
    color: var(--pink);
    background: var(--pink-glow);
}

/* ── Live price summary ───────────────────────────────────── */
.mv-price-summary {
    background: linear-gradient(135deg, #111500, #0a0a0a);
    border: 1px solid rgba(247, 141, 167, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.mv-price-summary__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.mv-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.mv-price-row:last-of-type {
    border-bottom: none;
}

.mv-price-row__label {
    color: var(--text-muted);
}

.mv-price-row__val {
    color: var(--text);
    font-weight: 600;
}

.mv-price-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(247, 141, 167, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.mv-price-total__label {
    font-family: var(--font-head);
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--text);
}

.mv-price-total__amount {
    font-family: var(--font-head);
    font-size: 36px;
    letter-spacing: 1px;
    color: var(--pink);
    animation: mv-counter 0.3s ease;
}

/* ── Payment tabs ────────────────────────────────────────── */
.mv-payment-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.mv-payment-tab {
    flex: 1;
    padding: 12px 16px;
    min-height: 44px;
    background: var(--dark);
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    border-right: 1px solid var(--border);
}

.mv-payment-tab:last-child {
    border-right: none;
}

.mv-payment-tab:hover {
    background: var(--surface);
    color: var(--text);
}

.mv-payment-tab.active {
    background: var(--surface);
    color: var(--pink);
    border-bottom: 2px solid var(--pink);
}

.mv-payment-tab img {
    height: 20px;
    width: auto;
}

.mv-payment-panel {
    display: none;
}

.mv-payment-panel.active {
    display: block;
}

/* Stripe Element */
#stripe-payment-element {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 200px;
}

/* PayPal */
#paypal-button-container {
    min-height: 50px;
}

/* ── Submit area ─────────────────────────────────────────── */
.mv-submit-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mv-submit-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    letter-spacing: 2px;
}

.mv-submit-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.5;
}

.mv-submit-note a {
    color: var(--text-muted);
}

.mv-submit-note a:hover {
    color: var(--pink);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .mv-create-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .mv-create-preview {
        position: relative;
        top: auto;
        /* Constrain portrait video to its intended width on single-column layout */
        max-width: 320px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* Price total: smaller font on mid-size screens */
    .mv-price-total__amount {
        font-size: 28px;
    }

    /* Tighter gap between payment tabs on tablet */
    .mv-payment-tabs {
        margin-bottom: 16px;
    }
}

@media (max-width: 600px) {
    .mv-create-layout {
        padding: 24px 0 60px;
    }

    .mv-form-card {
        padding: 20px;
    }

    .mv-type-toggle {
        flex-wrap: wrap;
    }

    .mv-type-toggle__btn {
        flex: 0 0 calc(33.33% - 4px);
    }

    .mv-radio-group {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Price total: compact on small phones */
    .mv-price-total__amount {
        font-size: 24px;
    }

    /* Stack payment tabs vertically on very small screens */
}

@media (max-width: 380px) {
    .mv-payment-tabs {
        flex-direction: column;
    }

    .mv-payment-tab {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .mv-payment-tab:last-child {
        border-bottom: none;
    }
}