/**
 * BrikPanel - Cart Share (storefront) styles
 * Neutral, theme-friendly. Monochrome to blend with most storefronts.
 */

/* Keep the [hidden] attribute authoritative over our own display rules
   (buttons/messages set display:inline-flex via their class). */
.brikpanel-cshare-overlay [hidden],
.brikpanel-cshare-wrap [hidden] {
    display: none !important;
}

.brikpanel-cshare-wrap {
    margin: 1rem 0;
    display: flex;
}

.brikpanel-cshare-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    color: #303030;
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}
.brikpanel-cshare-btn:hover {
    background: #f6f6f6;
    border-color: #bfbfbf;
}
.brikpanel-cshare-btn svg {
    flex-shrink: 0;
}

/* Overlay + panel */
.brikpanel-cshare-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.brikpanel-cshare-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
body.brikpanel-cshare-lock {
    overflow: hidden;
}

.brikpanel-cshare-panel {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(10px);
    transition: transform 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #303030;
}
.brikpanel-cshare-overlay.is-open .brikpanel-cshare-panel {
    transform: translateY(0);
}

.brikpanel-cshare-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ececec;
}
.brikpanel-cshare-head h3 {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #303030;
}
.brikpanel-cshare-close {
    border: none;
    background: transparent;
    color: #8a8a8a;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 0;
    border-radius: 0.375rem;
}
.brikpanel-cshare-close:hover {
    background: #f2f2f2;
    color: #303030;
}

.brikpanel-cshare-body {
    padding: 1.25rem;
}
.brikpanel-cshare-desc {
    margin: 0 0 0.875rem;
    font-size: 0.85rem;
    color: #616161;
    line-height: 1.5;
}
.brikpanel-cshare-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #616161;
    text-align: center;
    padding: 1rem 0;
}

.brikpanel-cshare-link-row {
    display: flex;
    gap: 0.5rem;
}
.brikpanel-cshare-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    color: #616161;
    border: 1px solid #d5d5d5;
    border-radius: 0.5rem;
    background: #f7f7f7;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.brikpanel-cshare-input:focus {
    outline: none;
    border-color: #303030;
}
.brikpanel-cshare-copy {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: #303030;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.brikpanel-cshare-copy:hover {
    background: #1a1a1a;
}
.brikpanel-cshare-copy.is-copied {
    background: #1a8917;
}

.brikpanel-cshare-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.brikpanel-cshare-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #303030;
    font-family: inherit;
}
.brikpanel-cshare-action:hover {
    background: #f6f6f6;
}
.brikpanel-cshare-action.wa {
    color: #1c8a3f;
    border-color: #bfe3c9;
    background: #f2fbf5;
}
.brikpanel-cshare-action.wa:hover {
    background: #e6f7ec;
}

@media (max-width: 480px) {
    .brikpanel-cshare-link-row {
        flex-direction: column;
    }
    .brikpanel-cshare-copy {
        width: 100%;
    }
}
