/**
 * Garden Premium – public stylesheet.
 *
 * Brand palette (per spec):
 *   - Primary  : #059669  (emerald)
 *   - Accent   : #e11d48  (rose – used for the share CTA so it really pops)
 *   - Ink/text : #0f172a  (deep slate)
 *
 * The plugin exposes its design tokens as CSS custom properties so themes
 * can override anything without editing this file.
 */

:root {
    --gp-color-primary:        #059669;
    --gp-color-primary-dark:   #047857;
    --gp-color-primary-darker: #065f46;
    --gp-color-primary-soft:   #ecfdf5;
    --gp-color-primary-tint:   #d1fae5;
    --gp-color-accent:         #e11d48;
    --gp-color-accent-dark:    #be123c;
    --gp-color-accent-soft:    #fff1f2;
    --gp-color-text:           #0f172a;
    --gp-color-muted:          #475569;
    --gp-color-bg:             #ffffff;
    --gp-color-bg-alt:         #f8fafc;
    --gp-color-border:         #e2e8f0;
    /* Backward-compat aliases: the share CTA used to be Facebook-blue, now
     * it lives on the brand accent so the button always feels "ours". */
    --gp-color-fb:             var(--gp-color-accent);
    --gp-color-fb-dark:        var(--gp-color-accent-dark);
    --gp-radius:               14px;
    --gp-shadow:               0 18px 40px rgba(15, 23, 42, .08);
    --gp-shadow-lg:            0 26px 60px rgba(15, 23, 42, .14);
    --gp-transition:           .25s cubic-bezier(.22, .61, .36, 1);
    --gp-font:                 inherit;
}

.gp-cta,
.gp-library,
.gp-post-audio,
.gp-unlocked {
    font-family: var(--gp-font);
    color: var(--gp-color-text);
    line-height: 1.55;
    box-sizing: border-box;
}

.gp-library *,
.gp-cta *,
.gp-post-audio *,
.gp-unlocked * {
    box-sizing: border-box;
}

/* ---------- CTA ----------------------------------------------------------- */

.gp-cta {
    margin: 2.5rem 0;
    padding: 2.25rem;
    background: linear-gradient(135deg, var(--gp-color-primary-soft) 0%, #ffffff 60%, var(--gp-color-accent-soft) 100%);
    border: 1px solid var(--gp-color-border);
    border-radius: calc(var(--gp-radius) + 4px);
    box-shadow: var(--gp-shadow);
    overflow: hidden;
    position: relative;
}

.gp-cta::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(5, 150, 105, .18), transparent 65%);
    pointer-events: none;
}

.gp-cta::after {
    content: '';
    position: absolute;
    left: -120px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(225, 29, 72, .14), transparent 65%);
    pointer-events: none;
}

.gp-cta__inner {
    position: relative;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.gp-cta__icon {
    flex: 0 0 auto;
    color: var(--gp-color-accent);
    background: #fff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(225, 29, 72, .22);
}

.gp-cta__content {
    flex: 1 1 auto;
    min-width: 0;
}

.gp-cta__title {
    margin: 0 0 .5rem;
    font-size: 1.55rem;
    line-height: 1.2;
    color: var(--gp-color-text);
}

.gp-cta__text {
    margin: 0 0 1.25rem;
    color: var(--gp-color-muted);
    max-width: 56ch;
}

.gp-cta__button {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    background: var(--gp-color-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .9rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--gp-transition), background var(--gp-transition), box-shadow var(--gp-transition);
    box-shadow: 0 8px 18px rgba(225, 29, 72, .28);
}

.gp-cta__button:hover,
.gp-cta__button:focus-visible {
    background: var(--gp-color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(225, 29, 72, .35);
    outline: none;
}

.gp-cta__button:disabled {
    opacity: .65;
    cursor: progress;
    transform: none;
}

.gp-cta__note {
    margin: .9rem 0 0;
    font-size: .85rem;
    color: var(--gp-color-muted);
}

/* ---------- Unlocked banner ---------------------------------------------- */

.gp-unlocked {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1.5rem;
    padding: .7rem 1.1rem;
    background: var(--gp-color-primary-soft);
    color: var(--gp-color-primary-darker);
    border: 1px solid var(--gp-color-primary-tint);
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
}

.gp-unlocked__icon svg {
    display: block;
}

/* ---------- Premium page intro ------------------------------------------- */

.gp-premium-page__intro {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--gp-color-muted);
    max-width: 70ch;
    margin: 0 0 2rem;
}

.gp-premium-page .gp-library {
    margin-top: 2rem;
}

/* ---------- Library grid -------------------------------------------------- */

.gp-library {
    margin: 2rem 0;
}

.gp-library__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gp-card {
    background: var(--gp-color-bg);
    border: 1px solid var(--gp-color-border);
    border-radius: var(--gp-radius);
    overflow: hidden;
    box-shadow: var(--gp-shadow);
    transition: transform var(--gp-transition), box-shadow var(--gp-transition);
    display: flex;
    flex-direction: column;
}

.gp-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gp-shadow-lg);
}

.gp-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--gp-color-bg-alt);
    overflow: hidden;
    display: block;
}

.gp-card__image,
.gp-card__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform var(--gp-transition);
}

.gp-card:hover .gp-card__image,
.gp-card:hover .gp-card__media img {
    transform: scale(1.04);
}

.gp-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 30%, rgba(5, 150, 105, .18), transparent 55%),
        linear-gradient(135deg, var(--gp-color-primary-soft), #ffffff);
}

.gp-card__duration {
    position: absolute;
    right: .65rem;
    bottom: .65rem;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    border-radius: 999px;
    padding: .15rem .55rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.gp-card__body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    flex: 1 1 auto;
}

.gp-card__title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
}

.gp-card__title a {
    color: var(--gp-color-text);
    text-decoration: none;
}

.gp-card__title a:hover {
    color: var(--gp-color-primary-dark);
    text-decoration: underline;
}

.gp-card__audio {
    width: 100%;
    margin-top: auto;
}

.gp-card__locked {
    margin-top: auto;
    background: var(--gp-color-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .65rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    transition: background var(--gp-transition), transform var(--gp-transition), box-shadow var(--gp-transition);
    box-shadow: 0 6px 14px rgba(225, 29, 72, .22);
}

.gp-card__locked:hover,
.gp-card__locked:focus-visible {
    background: var(--gp-color-accent-dark);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(225, 29, 72, .28);
}

.gp-card__lock-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3H9z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3H9z'/></svg>") center / contain no-repeat;
}

/* ---------- Post audio block --------------------------------------------- */

.gp-post-audio {
    margin: 2.5rem 0 0;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(180deg, var(--gp-color-primary-soft) 0%, var(--gp-color-bg-alt) 100%);
    border: 1px solid var(--gp-color-border);
    border-left: 4px solid var(--gp-color-primary);
    border-radius: var(--gp-radius);
}

.gp-post-audio__header {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .9rem;
}

.gp-post-audio__icon {
    color: var(--gp-color-primary);
    display: inline-flex;
}

.gp-post-audio__title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--gp-color-text);
}

.gp-post-audio__player {
    width: 100%;
}

/* ---------- Generic empty state ------------------------------------------ */

.gp-empty {
    padding: 1.5rem 1.75rem;
    text-align: center;
    color: var(--gp-color-muted);
    background: var(--gp-color-bg-alt);
    border: 1px dashed var(--gp-color-border);
    border-radius: var(--gp-radius);
}

/* ---------- Responsive ---------------------------------------------------- */

@media (max-width: 640px) {
    .gp-cta {
        padding: 1.6rem;
    }
    .gp-cta__inner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .gp-cta__icon {
        width: 64px;
        height: 64px;
    }
    .gp-cta__title {
        font-size: 1.3rem;
    }
}

/* ---------- Toast notifications ------------------------------------------ */

.gp-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: var(--gp-color-text);
    color: #fff;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    font-size: .95rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
    opacity: 0;
    transition: opacity var(--gp-transition), transform var(--gp-transition);
    z-index: 99999;
}

.gp-toast.is-error {
    background: var(--gp-color-accent-dark);
}

.gp-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
