/*
 * ══════════════════════════════════════════════════════════════
 *  GLAM SHARE SYSTEM — CSS
 *  File location: public/css/glam-share.css
 *
 *  Link in your master layout <head>:
 *  <link rel="stylesheet" href="{{ asset('css/glam-share.css') }}">
 * ══════════════════════════════════════════════════════════════
 */

/* ─── Share Button (below Buy Now on product card) ─────────── */
.glam-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: transparent;
    border: 1.5px solid #f4a7b9;
    color: #d4607a;
    border-radius: 25px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    margin-top: 6px;
}

.glam-share-btn:hover {
    background: #fde8ef;
    border-color: #d4607a;
    transform: scale(1.02);
}

.glam-share-btn i {
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .glam-share-btn {
        font-size: 0.73rem;
        padding: 6px 8px;
    }
}

/* ─── Modal Overlay ─────────────────────────────────────────── */
.glam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 10, 15, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.glam-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ─── Modal Box ─────────────────────────────────────────────── */
.glam-modal {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.8rem 1.8rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(180, 80, 100, 0.25);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.glam-modal-overlay.active .glam-modal {
    transform: translateY(0) scale(1);
}

/* ─── Close / Back Button ───────────────────────────────────── */
.glam-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f9f0f3;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.glam-modal-close:hover {
    background: #fde8ef;
    color: #d4607a;
}

/* ─── Icon at top of modal ──────────────────────────────────── */
.glam-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde8ef, #fdf6f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #d4607a;
    margin: 0 auto 1.1rem;
}

.glam-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c1a1e;
    text-align: center;
    margin-bottom: 0.5rem;
}

.glam-modal-desc {
    font-size: 0.88rem;
    color: #7a6068;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* ─── Product Preview Chip ──────────────────────────────────── */
.share-product-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8fb;
    border: 1px solid #f4a7b9;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 1.2rem;
}

.share-product-preview img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #f4a7b9;
}

.share-chip-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #2c1a1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.share-chip-price {
    font-size: 0.8rem;
    color: #c9973a;
    font-weight: 600;
}

/* ─── Option Cards (Step 1) ─────────────────────────────────── */
.glam-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.glam-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fafafa;
    border: 1.5px solid #f0e0e5;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.glam-action-card:hover {
    border-color: #d4607a;
    background: #fff5f7;
    transform: translateX(3px);
}

.action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.action-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c1a1e;
}

.action-sub {
    font-size: 0.76rem;
    color: #9a8088;
    margin-top: 2px;
}

/* ─── Form elements (Step 2) ────────────────────────────────── */
.glam-form-group {
    margin-bottom: 1rem;
}

.glam-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a3a42;
    margin-bottom: 6px;
}

.glam-input {
    width: 100%;
    border: 1.5px solid #f0d8de;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.9rem;
    color: #2c1a1e;
    outline: none;
    transition: border-color 0.2s;
    background: #fff9fb;
}

.glam-input:focus {
    border-color: #d4607a;
    box-shadow: 0 0 0 3px rgba(212, 96, 122, 0.12);
}

.glam-input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid #f0d8de;
    border-radius: 10px;
    overflow: hidden;
    background: #fff9fb;
    transition: border-color 0.2s;
}

.glam-input-group:focus-within {
    border-color: #d4607a;
    box-shadow: 0 0 0 3px rgba(212, 96, 122, 0.12);
}

.glam-input-prefix {
    padding: 11px 12px;
    font-size: 0.82rem;
    color: #7a6068;
    background: #fdf0f4;
    border-right: 1px solid #f0d8de;
    white-space: nowrap;
    flex-shrink: 0;
}

.glam-input-group .glam-input {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 11px 12px;
    flex: 1;
}

.glam-input-error {
    font-size: 0.78rem;
    color: #e05555;
    margin-top: 5px;
    min-height: 18px;
}

/* ─── Submit Button ─────────────────────────────────────────── */
.glam-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #d4607a, #e8809a);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 13px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.3px;
}

.glam-submit-btn:hover {
    opacity: 0.92;
    transform: scale(1.02);
}

.glam-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.glam-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.glam-privacy-note {
    font-size: 0.75rem;
    color: #aaa;
    text-align: center;
    margin-top: 0.8rem;
    margin-bottom: 0;
}

/* ─── Referral Code Box (Step 3) ────────────────────────────── */
.referral-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fde8ef, #fdf6f0);
    border: 2px dashed #d4607a;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 0.6rem;
}

.referral-code-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.4rem;
    font-weight: 800;
    color: #d4607a;
    letter-spacing: 3px;
}

.copy-code-btn {
    background: #d4607a;
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.copy-code-btn:hover { background: #b84e67; }

/* ─── Referral Link Preview ─────────────────────────────────── */
.referral-link-preview {
    background: #f9f0f3;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.72rem;
    color: #9a8088;
    margin-bottom: 1rem;
    word-break: break-all;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.referral-link-text {
    flex: 1;
}

.share-cta-text {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a3a42;
    margin-bottom: 0.8rem;
}

/* ─── Share Platform Buttons ────────────────────────────────── */
.share-platforms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.share-platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 13px 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    color: white;
}

.share-platform-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.whatsapp-share  { background: linear-gradient(135deg, #25d366, #1aab55); }
.instagram-share { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.share-platform-btn i { font-size: 1.05rem; }

/* ─── Toast Notification ────────────────────────────────────── */
.glam-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2c1a1e;
    color: white;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.glam-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.glam-toast i { color: #4ade80; }

/* ─── Mobile adjustments ────────────────────────────────────── */
@media (max-width: 480px) {
    .glam-modal {
        padding: 1.6rem 1.3rem 1.5rem;
    }

    .glam-modal-title {
        font-size: 1.18rem;
    }

    .referral-code-text {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .share-platforms {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .share-platform-btn {
        font-size: 0.8rem;
        padding: 11px 8px;
    }
}