/**
 * CitySpot Universal Share-to-Feed — Styles
 * File: /assets/css/cityspot-share.css
 */

/* ── MODAL OVERLAY ─────────────────────────────────────────────────────────── */
.cs-share-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
@media (min-width: 600px) {
    .cs-share-modal { align-items: center; padding: 20px; }
}

.cs-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: cs-fade-in 0.2s ease;
}

/* ── PANEL ─────────────────────────────────────────────────────────────────── */
.cs-share-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    background: #0d1627;
    border: 1px solid #1e2d45;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px 32px;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
    animation: cs-slide-up 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@media (min-width: 600px) {
    .cs-share-panel {
        border-radius: 28px;
        padding: 28px;
        animation: cs-pop-in 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    }
}

/* ── HEADER ────────────────────────────────────────────────────────────────── */
.cs-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.cs-share-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cs-share-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}
.cs-share-title {
    font-size: 1rem;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1.2;
}
.cs-share-subtitle {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}
.cs-share-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.cs-share-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ── PREVIEW CARD ──────────────────────────────────────────────────────────── */
.cs-share-preview {
    display: flex;
    align-items: center;
    gap: 13px;
    background: #111e33;
    border: 1px solid #1e2d45;
    border-radius: 16px;
    padding: 13px;
    margin-bottom: 18px;
}
.cs-preview-img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #1e2d45;
    flex-shrink: 0;
}
.cs-preview-type {
    font-size: 0.7rem;
    font-weight: 900;
    color: #c084fc;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.cs-preview-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── CAPTION ───────────────────────────────────────────────────────────────── */
.cs-share-field { margin-bottom: 14px; }
.cs-share-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cs-share-optional { font-weight: 600; color: #475569; text-transform: none; letter-spacing: 0; }
.cs-share-textarea {
    width: 100%;
    background: #111e33;
    border: 1px solid #1e2d45;
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 0.9rem;
    color: #f1f5f9;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cs-share-textarea::placeholder { color: #334155; }
.cs-share-textarea:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.cs-caption-count {
    text-align: right;
    font-size: 0.7rem;
    color: #475569;
    margin-top: 5px;
}

/* ── VISIBILITY ROW ────────────────────────────────────────────────────────── */
.cs-share-vis {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 11px;
    padding: 9px 13px;
    margin-bottom: 18px;
}
.cs-vis-icon { font-size: 0.9rem; }
.cs-vis-text { font-size: 0.78rem; font-weight: 700; color: #34d399; }

/* ── ACTIONS ───────────────────────────────────────────────────────────────── */
.cs-share-actions {
    display: flex;
    gap: 10px;
}
.cs-share-cancel {
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #1e2d45;
    border-radius: 13px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.cs-share-cancel:hover { border-color: #334155; color: #94a3b8; }
.cs-share-submit {
    flex: 1;
    padding: 13px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border: none;
    border-radius: 13px;
    font-size: 0.92rem;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transition: 0.2s;
}
.cs-share-submit:hover:not(:disabled) {
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.6);
    transform: translateY(-1px);
}
.cs-share-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── TOAST ─────────────────────────────────────────────────────────────────── */
.cs-share-toast {
    margin-top: 14px;
    padding: 11px 15px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}
.cs-toast-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.cs-toast-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* ── SHARE BUTTON (attach to any card) ─────────────────────────────────────── */
.cs-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #c084fc;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}
.cs-share-btn:hover {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(124, 58, 237, 0.5);
    color: #e0aaff;
    transform: translateY(-1px);
}
.cs-share-btn svg, .cs-share-btn .cs-share-icon-sm { font-size: 0.85rem; }
.cs-share-count {
    font-size: 0.68rem;
    color: #7c3aed;
    font-weight: 900;
    margin-left: 2px;
}

/* ── ANIMATIONS ────────────────────────────────────────────────────────────── */
@keyframes cs-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes cs-slide-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cs-pop-in   { from { transform: scale(0.93) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }