/*
 * Card, grid, pill, hero, search, pagination and empty-state styles.
 *
 * Moved out of the child theme's style.css. All of this styles markup the
 * plugin generates — tgc_build_card(), the landing renderer, the [gradients_app]
 * shortcode — so it belongs with the plugin: swap the theme and the cards still
 * look like cards.
 *
 * Loaded on the home page, single gradients, and any page rendering a card grid.
 */

#gradients-app {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	-webkit-font-smoothing: antialiased;
}

/* ─── Hero ───────────────────────────────────────────────── */
.ga-hero {
    text-align: center;
    padding: 72px 16px 52px;
}

.ga-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6E6E78;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 5px 12px;
    border: 1px solid #E8E8E8;
    border-radius: 50px;
    background: #fff;
}

/* ─── Search ─────────────────────────────────────────────── */
.ga-search {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 28px;
    display: block;
    position: relative;
}

.ga-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6E6E78;
    font-size: 15px;
    pointer-events: none;
}

.ga-search input {
    width: 100% !important;
    padding: 14px 22px 14px 46px !important;
    border-radius: 999px !important;
    border: 1.5px solid #E8E8E8 !important;
    font-size: 14px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.ga-search input:focus {
    border-color: #111 !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06) !important;
}

.ga-search input::placeholder { color: #8A8A93; }

/* ─── Filter pills ───────────────────────────────────────── */
.ga-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

.ga-pill {
    padding: 6px 15px;
    border-radius: 999px;
    border: 1px solid #E8E8E8;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.12s;
    line-height: 1.5;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.ga-pill:hover {
    border-color: #D0D0D0;
    color: #111;
    background: #FAFAFA;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.ga-pill.on {
    background: #0A0A0A !important;
    color: #fff !important;
    border-color: #0A0A0A !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* ─── Section ────────────────────────────────────────────── */
.ga-sec { margin: 40px 0 0; }

.ga-sec-hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0F0F0;
}

.ga-sec-hd h2 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #111 !important;
    letter-spacing: -0.01em !important;
}

.ga-sec-hd span {
    font-size: 12px;
    color: #6E6E78;
    font-weight: 400;
}

/* ─── Grid ───────────────────────────────────────────────── */
.ga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.ga-grid.feat {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ─── Card ───────────────────────────────────────────────── */
.gc {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1), box-shadow 0.18s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gc:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

.gc-preview {
    display: block;
    height: 160px;
    width: 100%;
    transition: opacity 0.15s;
}

.gc-preview:hover { opacity: 0.92; }

.gc-body { padding: 14px 16px 16px; }

.gc-brand {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6E6E78;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.gc-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 0 12px !important;
    color: #111 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

.gc-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.gc-title a:hover { color: #444 !important; }

.gc-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-bottom: 12px;
}

/* One chip per colour stop: dot + hex, click to copy the hex. */
.gc-stop {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 2px 6px 2px 2px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 50px !important;
    background: transparent !important;
    cursor: pointer;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: background .12s;
}
.gc-stop:hover { background: #F5F5F5 !important; }
.gc-stop:focus-visible { outline: 2px solid #5b4fcf; outline-offset: 1px; }

.gc-swatch {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    display: inline-block;
}

.gc-hex {
    font-size: 11px;
    color: #6B6B73;  /* was #777 (4.47:1), before that #CCC: 1.6:1 on white, too faint to read the code */
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: none !important;
    padding: 0 !important;
}
.gc-stop.ok .gc-hex { color: #2d7a4f; }

.gc-copy {
    width: 100% !important;
    padding: 8px !important;
    border-radius: 999px !important;
    border: 1px solid #F0F0F0 !important;
    background: #FAFAFA !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.12s !important;
    color: #666 !important;
    letter-spacing: 0.01em !important;
}

.gc-copy:hover {
    background: #F0F0F0 !important;
    color: #111 !important;
    border-color: #E0E0E0 !important;
}

.gc-copy.ok {
    background: #F0FDF4 !important;
    border-color: #BBF7D0 !important;
    color: #166534 !important;
}

/* ─── Divider ────────────────────────────────────────────── */
.ga-divider {
    border: none;
    border-top: 1px solid #F0F0F0;
    margin: 8px 0 40px;
}

/* ─── Empty state ────────────────────────────────────────── */
.ga-empty {
    text-align: center;
    padding: 80px 24px;
    color: #6E6E78;
    font-size: 14px;
}

.ga-empty a { color: #111; text-decoration: none; border-bottom: 1px solid #E0E0E0; }

/* ─── Pagination — replaces old .ga-pag rules ───────────────────────── */
.ga-pag {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 8px 0 72px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
}

.ga-pag::-webkit-scrollbar { display: none; }

.ga-pgbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #E8E8E8;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: all 0.12s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.ga-pgbtn-nav {
    min-width: 36px;
    padding: 0;
    font-size: 15px;
}

.ga-pgbtn:hover {
    border-color: #CCC;
    color: #111;
    background: #FAFAFA;
}

.ga-pgbtn.on {
    background: #0A0A0A;
    color: #fff;
    border-color: #0A0A0A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ga-pgellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 36px;
    color: #6E6E78;
    font-size: 13px;
    flex-shrink: 0;
    user-select: none;
}

@media (max-width: 600px) {
    .ga-pag {
        justify-content: flex-start;
        padding: 8px 16px 56px;
        margin: 0 -16px;
        width: calc(100% + 32px);
    }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
	.ga-hero { padding: 48px 0 36px; }
}

@media (max-width: 600px) {
	#gradients-app { padding: 0 16px; }
	.ga-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.gc-preview { height: 120px; }
	.ga-hero h1 { font-size: 26px; }
	.ga-hero p { font-size: 15px; }
}

@media (max-width: 400px) {
	.ga-grid { grid-template-columns: 1fr; }
}

/* ─── Explore: chip cards (includes/explore.php) ─────────────
 * On the home page, every landing page and the Grainy page. */

.ga-explore-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.ga-explore-card {
	background: #fff;
	border: 1px solid #F0F0F0;
	border-radius: 22px;
	padding: 18px 20px 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.ga-explore-card h3 {
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6E6E78 !important;
	margin: 0 0 12px !important;
}
.ga-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ga-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 6px;
	border-radius: 999px;
	background: #F6F6F8;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 500;
	color: #222 !important;
	text-decoration: none !important;
	transition: background .15s, border-color .15s, transform .15s;
}
.ga-chip:hover { background: #fff; border-color: #E4E4EA; transform: translateY(-1px); }
.ga-chip i { width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ga-chip i.r { border-radius: 50%; width: 18px; height: 18px; margin: 2px; }
.ga-chip i.grain {
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.6'/%3E%3C/svg%3E"),
		linear-gradient(135deg, #FF6B6B, #845EC2);
	background-blend-mode: overlay, normal;
}
.ga-chip b { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #111; color: #fff; padding: 2px 7px; border-radius: 999px; margin-left: 2px; }

.ga-chip[aria-current="page"] { background: #111; color: #fff !important; }
.ga-chip[aria-current="page"] i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.ga-explore-wide { grid-column: 1 / -1; }
@media (max-width: 640px) {
	.ga-explore-grid { grid-template-columns: 1fr; }
}


/* A "see more" link on the right of a section header. */
.ga-sec-link { font-size: 13px; font-weight: 600; color: #55555F !important; text-decoration: none !important; }
.ga-sec-link:hover { color: #111 !important; }
.ga-chip .tg-i { width: 18px; height: 18px; margin: 2px; flex-shrink: 0; color: #5B4FCF; }  /* "Surprise me" chip */
