/**
 * Red Jules Membership Card — Styles
 *
 * Card image dimensions reference: ~1500 x 1000 px (landscape, ~3:2 ratio).
 * The labels "Name :", "Number :", "Expires :" are baked into the image.
 * Dynamic values are positioned absolutely to align right after each colon.
 */

/* ============================================================
   1. Container
   ============================================================ */

.rjmc-container {
    max-width: 750px;
    margin: 30px auto;
    padding: 0 15px;
}

/* ============================================================
   2. Card Wrapper
   ============================================================ */

.rjmc-card {
    position: relative;
    width: 100%;
    line-height: 0;           /* Remove gap below inline image */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Background image fills the card width, height scales proportionally */
.rjmc-card-bg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================================
   3. Text Overlay Layer
   ============================================================ */

.rjmc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Fields container — positioned on the left side of the card */
.rjmc-fields {
    position: absolute;
    top: 32%;
    left: 8%;
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

/* Each label + value row */
.rjmc-field-row {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(10px, 1.6vw, 16px);
    color: #1a1a1a;
    line-height: 1.2;
    white-space: nowrap;
}

/* Bold labels */
.rjmc-label {
    font-weight: 700;
    color: #c0392b;
    min-width: 5.5em;
}

/* Normal weight values */
.rjmc-value {
    font-weight: 400;
}

/* ============================================================
   4. Action Buttons
   ============================================================ */

.rjmc-actions {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.rjmc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

.rjmc-btn svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.rjmc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rjmc-btn:active {
    transform: translateY(0);
}

/* Download button — red to match Red Jules branding */
.rjmc-btn-download {
    background-color: #c0392b;
    color: #ffffff;
    padding: 14px 36px;
    font-size: 16px;
}

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

/* ============================================================
   5. Message Box (for non-members / logged out)
   ============================================================ */

.rjmc-message-wrapper {
    max-width: 600px;
    margin: 50px auto;
    padding: 0 15px;
}

.rjmc-message {
    text-align: center;
    padding: 40px 30px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.rjmc-message h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #2c2c2c;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.rjmc-message p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555555;
    line-height: 1.5;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.rjmc-message-button {
    display: inline-block;
    padding: 1px 10px 18px;
    background-color: #c0392b;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    text-align: center;
}

.rjmc-message-button:hover {
    background-color: #e74c3c;
    color: #ffffff;
    text-decoration: none;
}

/* ============================================================
   6. Responsive Adjustments
   ============================================================ */

/* Tablets */
@media (max-width: 768px) {
    .rjmc-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .rjmc-actions {
        gap: 10px;
    }

    .rjmc-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .rjmc-container {
        margin: 15px auto;
    }

    .rjmc-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .rjmc-btn {
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
    }

    .rjmc-card {
        border-radius: 8px;
    }
}

/* ============================================================
   7. Print Styles — Only the membership card prints
   ============================================================ */

@media print {

    /* Hide everything on the page */
    body * {
        visibility: hidden !important;
    }

    /* Show only the card and its children */
    .rjmc-card,
    .rjmc-card * {
        visibility: visible !important;
    }

    /* Position the card at the top of the printed page */
    .rjmc-card {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide the action buttons when printing */
    .rjmc-actions {
        display: none !important;
    }

    /* Hide common WordPress elements */
    header,
    .site-header,
    nav,
    .navigation,
    .main-navigation,
    footer,
    .site-footer,
    .sidebar,
    .widget-area,
    #wpadminbar,
    .entry-meta,
    .post-navigation,
    .comments-area,
    .breadcrumbs {
        display: none !important;
    }

    /* Remove page margins for cleaner print */
    @page {
        margin: 10mm;
        size: landscape;
    }
}
