﻿/* Styling for the new share button on the tree card */
.btn-share {
    position: absolute;
    top: 5px;
    right: 50px;
    z-index: 10;
    background-color: rgba(20, 20, 20, 0.6); /* Default muted color */
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* --- MODIFICATION --- */
    opacity: 1; /* Always visible */
    transform: scale(1); /* Default scale */
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

@media (hover: hover) {
    .btn-share:hover {
        transform: scale(1.1);
        background-color: rgba(40, 40, 40, 0.8); /* Darken on hover */
    }

    /* Keep the green color on hover for shared buttons */
    .btn-share.is-shared:hover {
        background-color: #388E3C; /* Darker green */
        transform: scale(1.1);
    }
}

.btn-share.is-shared {
    background-color: var(--accent-color); /* Use the green accent color */
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); /* Optional glow */
}

/* Styles for the Share Modal */
.share-link-group {
    display: flex;
    margin-top: 0.5rem;
}

    .share-link-group input[type="text"] {
        flex-grow: 1;
        border: 1px solid var(--border-color);
        background-color: var(--bg-color);
        color: var(--primary-text);
        padding: 10px;
        border-radius: 4px 0 0 4px;
        font-size: 0.9rem;
        outline: none;
    }

.btn-copy {
    padding: 0 15px;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 500;
}

    .btn-copy:hover {
        background-color: #388E3C;
    }

.share-warning {
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-top: 1rem;
    font-style: italic;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--secondary-text);
}

#qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-color); /* Dark background behind the code */
    border-radius: 8px;
    margin-bottom: 1rem; /* Space between QR and link */
}

    /* Style the <img> tag generated by the QR code library */
    #qr-code-container img {
        display: block;
        width: 160px; /* Fixed size for the QR code */
        height: 160px;
        background: white; /* QR codes MUST have a white background */
        padding: 10px; /* Creates a white "border" */
        border-radius: 4px; /* Slightly rounded corners */
    }

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem; /* Space before the link */
}

.btn-qr-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--secondary-text);
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-qr-action:hover {
        background-color: var(--border-color);
        color: var(--primary-text);
    }

    .btn-qr-action svg {
        display: inline-block;
    }