/* Zdieľanie výsledku kalkulačky (js/share-card.js) */

.share-calc-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    background: rgba(227, 28, 37, 0.12);
    border: 1px solid rgba(227, 28, 37, 0.45);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.share-calc-btn i {
    color: var(--brand-red);
}

@media (hover: hover) and (pointer: fine) {
    .share-calc-btn:hover {
        background: rgba(227, 28, 37, 0.22);
        box-shadow: 0 0 14px rgba(227, 28, 37, 0.3);
    }
}

.share-calc-btn:active {
    transform: scale(0.96);
}

.share-calc-btn:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

.share-calc-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Modálne okno */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-modal {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.share-modal-title {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.2rem;
    margin: 0 2.5rem 1rem 0;
}

.share-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
}

.share-modal-close:hover {
    color: #ffffff;
}

.share-variant-toggle {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.share-variant-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.share-variant-btn.active {
    background: var(--brand-red);
    color: #ffffff;
}

.share-modal-preview-wrap {
    display: flex;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.share-modal.is-rendering .share-modal-preview-wrap,
.share-modal-overlay.is-rendering .share-modal-preview-wrap {
    opacity: 0.4;
}

/* Obrázok je na výšku (4:5) — obmedzíme výšku, aby sa okno zmestilo na obrazovku */
.share-modal-preview {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(62vh, 560px);
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000000;
}

.share-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.share-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.share-action:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.share-action[hidden] {
    display: none;
}

.share-action.primary {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #ffffff;
}

/* Krátka notifikácia */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 20px);
    z-index: 2100;
    background: #1c1c1f;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.7rem 1.1rem;
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: calc(100vw - 2rem);
}

.share-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
