/**
 * VIP Members Club - Frontend Styles
 * Mobile-First Responsive Design
 */

:root {
    --vip-bg-primary: #1C1C1E;
    --vip-bg-secondary: #2C2C2E;
    --vip-bg-tertiary: #3A3A3C;
    --vip-accent: #007AFF;
    --vip-accent-hover: #0A84FF;
    --vip-success: #34C759;
    --vip-error: #FF3B30;
    --vip-warning: #FF9500;
    --vip-text-primary: #FFFFFF;
    --vip-text-secondary: #98989D;
    --vip-text-tertiary: #636366;
    --vip-border: rgba(255, 255, 255, 0.1);
    --vip-glow: 0 0 40px rgba(0, 122, 255, 0.3);
    --vip-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --vip-radius: 16px;
    --vip-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Mobile-First Resets */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Registration Form - MOBILE FIRST */
.vip-registration-form {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px 15px;
    background: var(--vip-bg-secondary);
    border-radius: 0;
    border: none;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vip-registration-form h2 {
    color: var(--vip-text-primary);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

#vip-registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.vip-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.vip-form-row label {
    color: var(--vip-text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

.vip-form-row input[type="text"],
.vip-form-row input[type="email"],
.vip-form-row input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--vip-bg-tertiary);
    border: 1px solid var(--vip-border);
    border-radius: 12px;
    color: var(--vip-text-primary);
    font-size: 16px;
    transition: var(--vip-transition);
    -webkit-appearance: none;
    appearance: none;
}

.vip-form-row input:focus {
    outline: none;
    border-color: var(--vip-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.vip-form-row input::placeholder {
    color: var(--vip-text-tertiary);
}

.vip-form-row input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--vip-bg-tertiary);
    border: 2px dashed var(--vip-border);
    border-radius: 12px;
    color: var(--vip-text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--vip-transition);
}

.vip-form-row input[type="file"]:hover {
    border-color: var(--vip-accent);
    background: rgba(0, 122, 255, 0.05);
}

.vip-form-row label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--vip-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--vip-transition);
    text-transform: none;
    font-weight: 500;
    margin-left: 0;
    font-size: 14px;
}

.vip-form-row label:has(input[type="checkbox"]):hover {
    background: rgba(0, 122, 255, 0.05);
    border-color: var(--vip-accent);
}

.vip-form-row label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--vip-accent);
    flex-shrink: 0;
}

.vip-payment-section {
    margin-top: 20px;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--vip-border);
    border-radius: var(--vip-radius);
    width: 100%;
}

.vip-payment-section h3 {
    color: var(--vip-accent);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.vip-payment-section p {
    color: var(--vip-text-secondary);
    font-size: 16px;
    margin-bottom: 20px;
}

.vip-payment-section p strong {
    color: var(--vip-accent);
    font-size: 20px;
    font-weight: 700;
}

#card-element {
    padding: 14px 16px;
    background: var(--vip-bg-tertiary);
    border: 1px solid var(--vip-border);
    border-radius: 12px;
    transition: var(--vip-transition);
    width: 100%;
}

#card-element.StripeElement--focus {
    border-color: var(--vip-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#card-errors {
    color: var(--vip-error);
    font-size: 13px;
    margin-top: 10px;
    min-height: 20px;
    font-weight: 500;
}

#vip-registration-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--vip-transition);
    margin-top: 20px;
}

#vip-registration-form button[type="submit"]:active {
    transform: scale(0.98);
}

#vip-registration-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #555 0%, #333 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

#registration-message {
    margin-top: 20px;
    width: 100%;
}

/* Frontend Manager Dashboard - MOBILE FIRST */
.vip-manager-dashboard-frontend {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    background: var(--vip-bg-primary);
    border-radius: 0;
    color: var(--vip-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.vip-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.vip-dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

.vip-subtitle {
    color: var(--vip-text-secondary);
    font-size: 14px;
    margin: 0;
}

.vip-dashboard-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    width: 100%;
}

.vip-action-card {
    background: var(--vip-bg-secondary);
    border-radius: var(--vip-radius);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--vip-border);
    transition: var(--vip-transition);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.vip-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    transform: scaleX(0);
    transition: var(--vip-transition);
}

.vip-action-card:active::before {
    transform: scaleX(1);
}

.vip-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.vip-action-card h2 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--vip-text-primary);
}

.vip-action-card p {
    color: var(--vip-text-secondary);
    margin: 0 0 20px 0;
    font-size: 14px;
}

.vip-btn-primary,
.vip-btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--vip-transition);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.vip-btn-primary {
    background: linear-gradient(135deg, var(--vip-accent) 0%, var(--vip-accent-hover) 100%);
    color: white;
}

.vip-btn-primary:active {
    transform: scale(0.98);
}

.vip-btn-secondary {
    background: var(--vip-bg-tertiary);
    color: var(--vip-text-primary);
    border: 1px solid var(--vip-border);
}

.vip-btn-secondary:active {
    transform: scale(0.98);
}

/* Modal - MOBILE FIRST */
.vip-modal-frontend {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.vip-modal-content-frontend {
    position: relative;
    background: var(--vip-bg-secondary);
    margin: 0;
    padding: 20px 15px;
    border-radius: 0;
    width: 100%;
    min-height: 100vh;
    border: none;
    box-shadow: none;
}

.vip-modal-close {
    position: fixed;
    right: 15px;
    top: 15px;
    width: 36px;
    height: 36px;
    background: var(--vip-bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--vip-text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--vip-transition);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.vip-modal-close:active {
    background: var(--vip-error);
    color: white;
}

.vip-modal-content-frontend h2 {
    color: var(--vip-text-primary);
    font-size: 22px;
    margin: 0 0 20px 0;
    padding-right: 50px;
    word-break: break-word;
}

.vip-tabs-frontend {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--vip-bg-tertiary);
    padding: 4px;
    border-radius: 12px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vip-tab-frontend {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--vip-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--vip-transition);
    border-radius: 8px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.vip-tab-frontend.active {
    background: var(--vip-bg-secondary);
    color: var(--vip-accent);
}

.vip-tab-content-frontend {
    display: none;
    width: 100%;
}

.vip-tab-content-frontend.active {
    display: block;
}

.vip-search-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.vip-search-box input {
    width: 100%;
    padding: 14px 16px;
    background: var(--vip-bg-tertiary);
    border: 1px solid var(--vip-border);
    border-radius: 12px;
    color: var(--vip-text-primary);
    font-size: 15px;
    transition: var(--vip-transition);
    -webkit-appearance: none;
}

.vip-search-box input:focus {
    outline: none;
    border-color: var(--vip-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#vip-scanner-container-frontend {
    background: var(--vip-bg-tertiary);
    padding: 20px 15px;
    border-radius: var(--vip-radius);
    text-align: center;
    width: 100%;
    overflow: hidden;
}

#vip-scanner-status-frontend {
    color: var(--vip-accent);
    font-size: 14px;
    margin-bottom: 15px;
}

#vip-scanner-frontend {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

#vip-club-selector-frontend {
    margin-bottom: 20px;
    width: 100%;
}

#vip-club-selector-frontend label {
    display: block;
    color: var(--vip-text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

#vip-select-club-frontend {
    width: 100%;
    padding: 14px 16px;
    background: var(--vip-bg-tertiary);
    border: 1px solid var(--vip-border);
    border-radius: 12px;
    color: var(--vip-text-primary);
    font-size: 15px;
    cursor: pointer;
    -webkit-appearance: none;
}

/* VIP Card Display - MOBILE FIRST */
.vip-card-display {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

.vip-card-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.vip-card-inner {
    position: relative;
    background: linear-gradient(135deg, var(--vip-bg-secondary) 0%, var(--vip-bg-tertiary) 100%);
    border: 2px solid var(--vip-accent);
    border-radius: 20px;
    padding: 20px 15px;
    box-shadow: var(--vip-shadow);
    width: 100%;
    overflow: hidden;
}

.vip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--vip-border);
    flex-wrap: wrap;
    gap: 10px;
}

.vip-card-header h3 {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--vip-text-secondary);
    margin: 0;
}

.vip-card-status {
    background: var(--vip-success);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.vip-card-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.vip-card-photo {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.vip-card-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--vip-accent);
}

.vip-card-photo-ring {
    position: absolute;
    inset: -6px;
    border: 2px solid var(--vip-accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringPulse 2s infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.vip-card-info {
    width: 100%;
}

.vip-card-info h2 {
    font-size: 22px;
    margin: 0 0 8px 0;
    color: var(--vip-text-primary);
    word-break: break-word;
}

.vip-card-id {
    color: var(--vip-accent);
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Courier New', monospace;
}

.vip-card-clubs {
    color: var(--vip-text-secondary);
    font-size: 13px;
    margin: 0;
}

.vip-card-qr {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 16px;
    width: 100%;
}

.vip-card-qr img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.vip-card-qr p {
    color: var(--vip-bg-primary);
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Tablet and Up */
@media (min-width: 768px) {
    .vip-registration-form {
        max-width: 700px;
        margin: 40px auto;
        padding: 40px;
        border-radius: 24px;
        border: 1px solid var(--vip-border);
        box-shadow: var(--vip-shadow);
    }

    .vip-registration-form h2 {
        font-size: 32px;
        margin-bottom: 32px;
    }

    #vip-registration-form {
        gap: 25px;
    }

    .vip-form-row input {
        padding: 18px 20px;
        font-size: 16px;
    }

    .vip-payment-section {
        padding: 30px;
    }

    .vip-payment-section h3 {
        font-size: 22px;
    }

    #vip-registration-form button[type="submit"] {
        padding: 20px;
        font-size: 18px;
    }

    #vip-registration-form button[type="submit"]:hover {
        transform: translateY(-4px);
        box-shadow: 0 0 40px rgba(0, 122, 255, 0.5), var(--vip-shadow);
    }

    .vip-manager-dashboard-frontend {
        max-width: 1200px;
        margin: 40px auto;
        padding: 20px;
        border-radius: var(--vip-radius);
    }

    .vip-dashboard-header h1 {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .vip-subtitle {
        font-size: 16px;
    }

    .vip-dashboard-cards {
        flex-direction: row;
        gap: 24px;
    }

    .vip-action-card {
        padding: 32px;
    }

    .vip-action-card:hover {
        transform: translateY(-4px);
        border-color: var(--vip-accent);
        box-shadow: var(--vip-glow);
    }

    .vip-action-card:hover::before {
        transform: scaleX(1);
    }

    .vip-card-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .vip-action-card h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .vip-btn-primary:hover,
    .vip-btn-secondary:hover {
        transform: translateY(-2px);
    }

    .vip-modal-content-frontend {
        margin: 3% auto;
        padding: 40px;
        border-radius: var(--vip-radius);
        width: 90%;
        max-width: 800px;
        min-height: auto;
        border: 1px solid var(--vip-border);
        box-shadow: var(--vip-shadow);
    }

    .vip-modal-close {
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .vip-modal-close:hover {
        background: var(--vip-error);
        color: white;
        transform: rotate(90deg);
    }

    .vip-modal-content-frontend h2 {
        font-size: 28px;
        margin-bottom: 30px;
        padding-right: 0;
    }

    .vip-tabs-frontend {
        gap: 12px;
        margin-bottom: 30px;
    }

    .vip-tab-frontend {
        padding: 12px 24px;
        font-size: 15px;
    }

    .vip-search-box {
        flex-direction: row;
        gap: 12px;
    }

    .vip-search-box input {
        padding: 16px 20px;
    }

    #vip-scanner-container-frontend {
        padding: 30px;
    }

    #vip-scanner-status-frontend {
        font-size: 16px;
        margin-bottom: 20px;
    }

    #vip-scanner-frontend {
        max-width: 500px;
    }

    .vip-card-display {
        max-width: 600px;
        margin: 40px auto;
    }

    .vip-card-inner {
        padding: 40px;
        border-radius: 24px;
    }

    .vip-card-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    .vip-card-header h3 {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .vip-card-status {
        padding: 6px 16px;
        font-size: 12px;
    }

    .vip-card-profile {
        flex-direction: row;
        text-align: left;
        gap: 30px;
    }

    .vip-card-photo {
        width: 120px;
        height: 120px;
    }

    .vip-card-info h2 {
        font-size: 28px;
    }

    .vip-card-id {
        font-size: 16px;
    }

    .vip-card-clubs {
        font-size: 14px;
    }

    .vip-card-qr {
        padding: 20px;
    }

    .vip-card-qr img {
        width: 200px;
        height: 200px;
    }

    .vip-card-qr p {
        font-size: 14px;
        margin-top: 12px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .vip-registration-form {
        margin: 60px auto;
        padding: 50px;
    }

    .vip-registration-form h2 {
        font-size: 36px;
        margin-bottom: 40px;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .vip-card-display,
    .vip-card-display * {
        visibility: visible;
    }
    .vip-card-display {
        position: absolute;
        left: 0;
        top: 0;
    }
}