/* FotoMembership — Frontend CSS */

/* ── Gallery ───────────────────────────────────────────────── */
.fm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; padding: 16px 0; }
.fm-album-card { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.1); transition: transform .2s, box-shadow .2s; cursor: pointer; background: #111; }
.fm-album-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.fm-album-cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.fm-album-cover-canvas { width: 100%; aspect-ratio: 4/3; display: block; }
.fm-album-info { padding: 14px 16px; }
.fm-album-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.fm-album-meta { font-size: 13px; color: #666; margin: 0; }
.fm-album-locked { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #fff; }
.fm-lock-icon { font-size: 28px; }
.fm-lock-label { font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }

/* ── Album viewer ──────────────────────────────────────────── */
.fm-album-viewer { padding: 16px 0; }
.fm-media-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.fm-thumb { position: relative; cursor: pointer; border-radius: 8px; overflow: hidden; background: #111; aspect-ratio: 4/3; transition: transform .15s; -webkit-user-drag: none; }
.fm-thumb:hover { transform: scale(1.03); }
.fm-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; display: block; }
.fm-thumb-canvas { width: 100%; height: 100%; display: block; }
.fm-thumb-video-badge { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.7); color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.fm-thumb-vimeo-badge { position: absolute; top: 6px; right: 6px; background: #1ab7ea; color: #fff; border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 700; }
.fm-protected { pointer-events: none; user-select: none; -webkit-user-drag: none; }

/* ── Locked content ────────────────────────────────────────── */
.fm-locked-content { text-align: center; padding: 48px 24px; border: 2px dashed #ddd; border-radius: 12px; }
.fm-locked-content h3 { margin: 0 0 8px; }
.fm-locked-content p { color: #666; margin: 0 0 20px; }

/* ── Lightbox ──────────────────────────────────────────────── */
#fm-lightbox { display: none; }
#fm-lightbox.active { display: flex; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; }
#fm-lb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.92); }
#fm-lb-inner { position: relative; z-index: 1; max-width: 92vw; max-height: 92vh; display: flex; align-items: center; }
#fm-lb-media { max-width: 85vw; max-height: 88vh; position: relative; }
#fm-lb-media img, #fm-lb-media canvas { max-width: 85vw; max-height: 85vh; object-fit: contain; display: block; border-radius: 4px; pointer-events: none; }
#fm-lb-media video { max-width: 85vw; max-height: 85vh; display: block; }
#fm-lb-media iframe.fm-lb-vimeo { width: 80vw; height: 45vw; max-height: 80vh; border: none; }
.fm-lb-loader { color: #fff; font-size: 14px; padding: 40px; }
#fm-lb-close { position: fixed; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; z-index: 2; line-height: 1; opacity: .8; }
#fm-lb-close:hover { opacity: 1; }
#fm-lb-prev, #fm-lb-next { background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 36px; padding: 12px 16px; cursor: pointer; border-radius: 6px; z-index: 2; transition: background .15s; }
#fm-lb-prev:hover, #fm-lb-next:hover { background: rgba(255,255,255,.2); }
#fm-lb-prev { margin-right: 12px; }
#fm-lb-next { margin-left: 12px; }
#fm-lb-watermark { position: absolute; bottom: 12px; right: 16px; color: rgba(255,255,255,.35); font-size: 12px; pointer-events: none; user-select: none; }
.fm-canvas-wrap { display: block; }

/* ── Video player ──────────────────────────────────────────── */
.fm-video-player-wrap { position: relative; display: inline-block; width: 100%; }
.fm-local-video { width: 100%; display: block; border-radius: 8px; }
.fm-vimeo-iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; }
.fm-video-watermark { position: absolute; color: rgba(255,255,255,.4); font-size: 13px; font-weight: 500; pointer-events: none; user-select: none; transition: top .5s, left .5s, bottom .5s, right .5s; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.5); z-index: 10; }

/* ── Pricing table ─────────────────────────────────────────── */
.fm-pricing-wrap { padding: 24px 0; }
.fm-cycle-switch { text-align: center; margin-bottom: 32px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; }
.fm-toggle-switch { position: relative; width: 44px; height: 24px; }
.fm-toggle-switch input { opacity: 0; width: 0; height: 0; }
.fm-toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 24px; cursor: pointer; transition: .3s; }
.fm-toggle-slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.fm-toggle-switch input:checked + .fm-toggle-slider { background: #111; }
.fm-toggle-switch input:checked + .fm-toggle-slider:before { transform: translateX(20px); }
.fm-savings-badge { background: #e8f5e9; color: #2e7d32; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

.fm-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.fm-plan-card { border: 2px solid #e5e7eb; border-radius: 16px; padding: 32px 24px; text-align: center; position: relative; transition: border-color .2s, box-shadow .2s; }
.fm-plan-card.fm-featured { border-color: #111; box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.fm-featured-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #111; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 14px; border-radius: 20px; letter-spacing: .5px; }
.fm-plan-name { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.fm-plan-desc { font-size: 14px; color: #666; margin: 0 0 20px; }
.fm-plan-price { font-size: 40px; font-weight: 800; margin: 0; }
.fm-plan-price sup { font-size: 18px; font-weight: 600; vertical-align: top; margin-top: 10px; }
.fm-plan-price .fm-cycle-label { font-size: 14px; font-weight: 400; color: #888; }
.fm-plan-features { list-style: none; padding: 0; margin: 20px 0 24px; text-align: left; }
.fm-plan-features li { padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; gap: 8px; }
.fm-plan-features li:before { content: '✓'; color: #111; font-weight: 700; }
.fm-subscribe-btn { display: block; width: 100%; padding: 14px; background: #111; color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.fm-subscribe-btn:hover { background: #333; }
.fm-subscribe-btn:disabled { background: #999; cursor: not-allowed; }
.fm-plan-card.fm-featured .fm-subscribe-btn { background: #111; }

/* ── My Account ────────────────────────────────────────────── */
.fm-account-wrap { max-width: 640px; }
.fm-account-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.fm-account-card h3 { margin: 0 0 12px; font-size: 16px; }
.fm-account-meta { font-size: 14px; color: #555; margin: 4px 0; }
.fm-account-meta strong { color: #111; }
.fm-status-active { color: #00a32a; font-weight: 700; }
.fm-status-expired, .fm-status-cancelled { color: #d63638; font-weight: 700; }
.fm-cancel-link { color: #d63638; background: none; border: none; cursor: pointer; font-size: 13px; text-decoration: underline; margin-top: 12px; display: inline-block; }

/* ── Buttons ───────────────────────────────────────────────── */
.fm-btn { display: inline-block; padding: 10px 20px; background: #111; color: #fff; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: background .2s; }
.fm-btn:hover { background: #333; }
.fm-load-error { color: #d63638; font-size: 13px; padding: 12px; }
