/*
 * deal-share.css — Share Deal Modal
 * Batch 47: Share modal overlay + card + form elements
 *
 * Zero hardcoded colors — all CSS custom properties from base.css.
 * Exception: .share-modal-overlay background uses rgba(0,0,0,0.5) — acceptable for overlay only.
 *
 * Animate in: .share-modal-card transitions from opacity:0 / scale(0.95) to opacity:1 / scale(1)
 *             via inline style set in deal-share.js (class `is-open` pattern used as fallback)
 */

/* ============================================================
   OVERLAY — FULL VIEWPORT BACKDROP
   ============================================================ */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.50); /* semi-transparent black — only acceptable hardcoded value */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* ============================================================
   CARD — MODAL PANEL
   ============================================================ */
.share-modal-card {
    width: 480px;
    max-width: 100%;
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--glass-shadow);
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;

    /* Initial animation state — driven by JS inline styles */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Open state (class-based fallback) */
.share-modal-card.is-open {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================
   HEADER ROW — TITLE + CLOSE BUTTON
   ============================================================ */
.share-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.share-modal__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wide);
    color: var(--text-primary);
    text-transform: uppercase;
}

.share-modal__close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.share-modal__close:hover {
    color: var(--text-primary);
    background: var(--surface-glass-hover);
}

/* ============================================================
   ADDRESS LINE
   ============================================================ */
.share-modal__address {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 12px 0 4px;
    line-height: var(--leading-snug);
    word-break: break-word;
}

/* ============================================================
   STRATEGY BADGE
   ============================================================ */
.share-modal__strategy-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--blue-steel);
    border-radius: var(--radius-full);
    padding: 2px 10px;
    line-height: 1.6;
}

/* ============================================================
   URL INPUT
   ============================================================ */
.share-modal__url-input {
    display: block;
    width: 100%;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    background: var(--surface-dark-2);
    border: 1.5px solid var(--blue-steel);
    border-radius: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
    outline: none;
    cursor: text;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.15s ease;
}

.share-modal__url-input:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 2px var(--cyan-alpha-10);
}

/* ============================================================
   COPY BUTTON
   ============================================================ */
.share-modal__copy-btn {
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 10px;
    background: var(--gold-500);
    color: var(--text-inverse);
    border: none;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.share-modal__copy-btn:hover {
    background: var(--gold-400);
    box-shadow: var(--glow-gold-sm);
}

.share-modal__copy-btn:active {
    background: var(--gold-600);
}

/* ============================================================
   QR CODE PLACEHOLDER
   ============================================================ */
.share-modal__qr-placeholder {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    background: var(--surface-dark-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto;
    flex-shrink: 0;
}

.share-modal__qr-placeholder span {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================================
   FOOTER NOTE
   ============================================================ */
.share-modal__footer-note {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ============================================================
   RESPONSIVE — NARROW SCREENS
   ============================================================ */
@media (max-width: 520px) {
    .share-modal-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .share-modal__title {
        font-size: 0.85rem;
    }
}
