/**
 * Animalium Gedenkbuch - Frontend Styles
 * All classes prefixed with .animalium-gb- for strict scoping.
 */

/* ============================================
   CSS Custom Properties (set via PHP inline)
   ============================================ */

/* ============================================
   Base Container
   ============================================ */
.animalium-gb-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--jeag-color-text, #54595F);
    line-height: 1.7;
}

.animalium-gb-container *,
.animalium-gb-container *::before,
.animalium-gb-container *::after {
    box-sizing: border-box;
}

/* ============================================
   Typography
   ============================================ */
.animalium-gb-container h1,
.animalium-gb-container h2,
.animalium-gb-container h3 {
    font-family: "Roboto Slab", serif;
    font-weight: 400;
    color: #2c2c2c;
    line-height: 1.3;
}

.animalium-gb-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5em;
}

.animalium-gb-container h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
}

.animalium-gb-container p {
    margin-bottom: 1em;
}

/* ============================================
   Overview Page
   ============================================ */
.animalium-gb-overview-hero {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.animalium-gb-overview-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.4em;
}

.animalium-gb-overview-hero p {
    max-width: 700px;
    margin: 0 auto 1.5em auto;
    font-size: 1.05rem;
    color: #666;
}

.animalium-gb-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--jeag-color-secondary, #90BB95);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.animalium-gb-btn:hover {
    background-color: var(--jeag-color-primary, #00933C);
    color: #fff;
    text-decoration: none;
}

.animalium-gb-btn-outline {
    background-color: transparent;
    color: var(--jeag-color-secondary, #90BB95);
    border: 2px solid var(--jeag-color-secondary, #90BB95);
}

.animalium-gb-btn-outline:hover {
    background-color: var(--jeag-color-secondary, #90BB95);
    color: #fff;
}

.animalium-gb-btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Search and Filter Bar */
.animalium-gb-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.animalium-gb-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid var(--jeag-color-secondary, #90BB95);
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.animalium-gb-search-input:focus {
    border-color: var(--jeag-color-primary, #00933C);
}

.animalium-gb-select {
    padding: 10px 16px;
    border: 2px solid var(--jeag-color-secondary, #90BB95);
    border-radius: 5px;
    font-size: 1rem;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.animalium-gb-select:focus {
    border-color: var(--jeag-color-primary, #00933C);
}

/* Card Grid */
.animalium-gb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.animalium-gb-grid--compact {
    grid-template-columns: repeat(4, 1fr);
}

.animalium-gb-grid--wide {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .animalium-gb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .animalium-gb-grid,
    .animalium-gb-grid--compact,
    .animalium-gb-grid--wide {
        grid-template-columns: 1fr;
    }
}

/* Card */
.animalium-gb-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.animalium-gb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.animalium-gb-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.animalium-gb-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.animalium-gb-card__name {
    font-family: "Roboto Slab", serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #2c2c2c;
}

.animalium-gb-card__meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.animalium-gb-card__quote {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
    padding-top: 8px;
}

.animalium-gb-card__link {
    display: inline-block;
    margin-top: 12px;
    color: var(--jeag-color-primary, #00933C);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
}

.animalium-gb-card__link:hover {
    text-decoration: underline;
}

/* Pagination */
.animalium-gb-pagination {
    text-align: center;
    padding: 20px 0 40px;
}

.animalium-gb-pagination a,
.animalium-gb-pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.animalium-gb-pagination a {
    color: var(--jeag-color-text, #54595F);
    border: 1px solid #ddd;
}

.animalium-gb-pagination a:hover {
    background: var(--jeag-color-secondary, #90BB95);
    color: #fff;
    border-color: var(--jeag-color-secondary, #90BB95);
}

.animalium-gb-pagination .current {
    background: var(--jeag-color-primary, #00933C);
    color: #fff;
    border: 1px solid var(--jeag-color-primary, #00933C);
}

/* No results */
.animalium-gb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.animalium-gb-no-results p {
    font-size: 1.1rem;
}

/* ============================================
   Form Styles
   ============================================ */
.animalium-gb-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 0;
}

.animalium-gb-form-step {
    display: none;
}

.animalium-gb-form-step.active {
    display: block;
}

.animalium-gb-form-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.animalium-gb-form-progress__step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s ease;
}

.animalium-gb-form-progress__step.active {
    background: var(--jeag-color-primary, #00933C);
}

.animalium-gb-form-progress__step.completed {
    background: var(--jeag-color-secondary, #90BB95);
}

.animalium-gb-field {
    margin-bottom: 20px;
}

.animalium-gb-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.animalium-gb-field .required {
    color: #c0392b;
}

.animalium-gb-field input[type="text"],
.animalium-gb-field input[type="email"],
.animalium-gb-field input[type="tel"],
.animalium-gb-field input[type="date"],
.animalium-gb-field input[type="number"],
.animalium-gb-field select,
.animalium-gb-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--jeag-color-secondary, #90BB95);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.animalium-gb-field input:focus,
.animalium-gb-field select:focus,
.animalium-gb-field textarea:focus {
    border-color: var(--jeag-color-primary, #00933C);
}

.animalium-gb-field textarea {
    min-height: 150px;
    resize: vertical;
}

.animalium-gb-field .description {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

.animalium-gb-field-error {
    border-color: #c0392b !important;
}

.animalium-gb-error-message {
    color: #c0392b;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Checkbox fields */
.animalium-gb-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.animalium-gb-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--jeag-color-primary, #00933C);
}

.animalium-gb-checkbox label {
    font-weight: 400;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* File upload area */
.animalium-gb-upload-area {
    border: 2px dashed var(--jeag-color-secondary, #90BB95);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.animalium-gb-upload-area:hover {
    border-color: var(--jeag-color-primary, #00933C);
    background: #f9fdf9;
}

.animalium-gb-upload-area.dragging {
    border-color: var(--jeag-color-primary, #00933C);
    background: #f0f8f0;
}

.animalium-gb-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.animalium-gb-upload-preview__item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
}

.animalium-gb-upload-preview__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.animalium-gb-upload-preview__remove {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 3;
}

/* Form navigation */
.animalium-gb-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Inspiration questions */
.animalium-gb-inspiration {
    background: #f9f9f7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.animalium-gb-inspiration h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #555;
}

.animalium-gb-inspiration ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.animalium-gb-inspiration li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Honeypot (hidden from users) */
.animalium-gb-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================
   Single Memorial Page
   ============================================ */
.animalium-gb-memorial {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.animalium-gb-memorial__header {
    text-align: center;
    margin-bottom: 40px;
}

.animalium-gb-memorial__image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 24px;
}

.animalium-gb-memorial__subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 400;
}

.animalium-gb-memorial__name {
    font-size: 2.5rem;
    margin: 0 0 8px 0;
}

.animalium-gb-memorial__dates {
    font-size: 1rem;
    color: #888;
}

.animalium-gb-memorial__quote {
    font-style: italic;
    font-size: 1.1rem;
    color: #555;
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 3px solid var(--jeag-color-secondary, #90BB95);
}

.animalium-gb-memorial__text {
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 30px 0;
}

/* Gallery */
.animalium-gb-gallery {
    margin: 40px 0;
}

.animalium-gb-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.animalium-gb-gallery__item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.animalium-gb-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.animalium-gb-gallery__item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.animalium-gb-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.animalium-gb-lightbox.active {
    display: flex;
}

.animalium-gb-lightbox__image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

.animalium-gb-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
}

/* Actions bar */
.animalium-gb-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

/* Success message */
.animalium-gb-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.animalium-gb-success h3 {
    color: #155724;
    margin-bottom: 8px;
}

/* Loading spinner */
.animalium-gb-loading {
    text-align: center;
    padding: 40px;
}

.animalium-gb-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #eee;
    border-top-color: var(--jeag-color-primary, #00933C);
    border-radius: 50%;
    animation: jeag-spin 0.8s linear infinite;
}

@keyframes jeag-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Animalium Brand Refinements
   ============================================ */
.animalium-gb-container {
    --jeag-brand: var(--jeag-color-primary, #00933c);
    --jeag-brand-soft: var(--jeag-color-secondary, #90ba8b);
    --jeag-accent: var(--jeag-color-accent, #ffbc7d);
    --jeag-ink: var(--jeag-color-text, #54595f);
    --jeag-heading: #26352d;
    --jeag-muted: #78827c;
    --jeag-line: rgba(144, 186, 139, 0.34);
    --jeag-surface: #f7faf7;
    --jeag-shadow: 0 18px 50px rgba(37, 68, 48, 0.09);
    max-width: 1180px;
    color: var(--jeag-ink);
}

.animalium-gb-container h1,
.animalium-gb-container h2,
.animalium-gb-container h3 {
    color: var(--jeag-heading);
    letter-spacing: -0.018em;
}

.animalium-gb-container :focus-visible {
    outline: 3px solid rgba(255, 188, 125, 0.75);
    outline-offset: 3px;
}

.animalium-gb-overview-hero {
    position: relative;
    max-width: 850px;
    margin: 0 auto 42px;
    padding: 62px 30px 44px;
}

.animalium-gb-overview-hero::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 50%;
    width: 54px;
    height: 3px;
    border-radius: 99px;
    background: var(--jeag-accent);
    transform: translateX(-50%);
}

.animalium-gb-overview-hero h1 {
    font-size: clamp(2.15rem, 5vw, 3.35rem);
    color: var(--jeag-brand);
}

.animalium-gb-overview-hero p {
    max-width: 760px;
    color: var(--jeag-ink);
    font-size: 1.08rem;
}

.animalium-gb-btn {
    min-height: 46px;
    padding: 12px 25px;
    border: 2px solid var(--jeag-brand-soft);
    border-radius: 5px;
    background: var(--jeag-brand-soft);
    box-shadow: 0 8px 20px rgba(80, 125, 91, 0.14);
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.animalium-gb-btn:hover {
    border-color: var(--jeag-brand);
    background: var(--jeag-brand);
    box-shadow: 0 11px 24px rgba(0, 147, 60, 0.2);
    transform: translateY(-1px);
}

.animalium-gb-btn:active {
    box-shadow: none;
    transform: translateY(0);
}

.animalium-gb-btn-outline {
    color: var(--jeag-brand);
    border-color: var(--jeag-brand-soft);
    background: #fff;
    box-shadow: none;
}

.animalium-gb-btn-outline:hover {
    border-color: var(--jeag-brand);
    background: var(--jeag-brand);
}

.animalium-gb-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(180px, 220px);
    gap: 12px;
    align-items: center;
    margin-bottom: 38px;
    padding: 10px;
    border: 0;
    border-radius: 16px;
    background: #f8f5ef;
}

.animalium-gb-search-input,
.animalium-gb-select,
.animalium-gb-input,
.animalium-gb-textarea {
    min-height: 48px;
    padding: 11px 15px;
    color: var(--jeag-ink);
    border: 1px solid transparent;
    border-radius: 10px;
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.animalium-gb-search-input,
.animalium-gb-select {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: 0 2px 10px rgba(73, 63, 48, 0.05);
}

.animalium-gb-input,
.animalium-gb-textarea {
    width: 100%;
}

.animalium-gb-search-input:hover,
.animalium-gb-select:hover,
.animalium-gb-input:hover,
.animalium-gb-textarea:hover {
    border-color: rgba(144, 186, 139, 0.55);
}

.animalium-gb-search-input:focus,
.animalium-gb-select:focus,
.animalium-gb-input:focus,
.animalium-gb-textarea:focus {
    border-color: var(--jeag-brand-soft);
    box-shadow: 0 0 0 4px rgba(144, 186, 139, 0.14);
    outline: none;
}

.animalium-gb-grid {
    gap: 30px;
}

.animalium-gb-card {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #fbf8f2;
    box-shadow: 0 10px 30px rgba(73, 63, 48, 0.08);
    text-decoration: none !important;
}

.animalium-gb-card *,
.animalium-gb-card:hover *,
.animalium-gb-card:focus * {
    text-decoration: none !important;
}

.animalium-gb-card:hover {
    box-shadow: 0 18px 42px rgba(73, 63, 48, 0.13);
    transform: translateY(-4px);
}

.animalium-gb-card__image {
    height: 260px;
    transition: transform 0.45s ease;
}

.animalium-gb-card:hover .animalium-gb-card__image {
    transform: scale(1.025);
}

.animalium-gb-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f2f7f3, #e8f0e9);
    color: rgba(0, 147, 60, 0.3);
}

.animalium-gb-card__body {
    position: relative;
    z-index: 1;
    min-height: 168px;
    padding: 24px 25px 27px;
    background: #fbf8f2;
}

.animalium-gb-card__name {
    color: #31523e;
    font-size: 1.45rem;
    line-height: 1.25;
}

.animalium-gb-card__meta {
    display: block;
    margin-top: 5px;
    color: #7b817c;
    font-size: 0.86rem;
    letter-spacing: 0.015em;
}

.animalium-gb-card__quote {
    margin-bottom: 0;
    padding: 17px 0 0;
    color: #68635d;
    font-family: "Roboto Slab", serif;
    font-size: 0.92rem;
    line-height: 1.55;
}

.animalium-gb-form {
    max-width: 860px;
    margin: 48px auto;
    padding: 42px clamp(22px, 5vw, 54px);
    border: 1px solid var(--jeag-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--jeag-shadow);
}

.animalium-gb-form > h1 {
    margin-top: 0;
    color: var(--jeag-brand);
    font-size: clamp(2rem, 5vw, 2.75rem);
}

.animalium-gb-form-step h2 {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 13px;
}

.animalium-gb-form-step.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    align-items: start;
}

.animalium-gb-form-step > h2,
.animalium-gb-form-step > .description,
.animalium-gb-form-step > .animalium-gb-checkbox,
.animalium-gb-form-step > .animalium-gb-form-nav,
.animalium-gb-form-step > .animalium-gb-edit-summary,
.animalium-gb-form-step > .animalium-gb-edit-feedback,
.animalium-gb-form-step > .cf-turnstile,
.animalium-gb-form-step > script,
.animalium-gb-form-step > .animalium-gb-hp {
    grid-column: 1 / -1;
}

.animalium-gb-form-step > .animalium-gb-field--full {
    grid-column: 1 / -1;
}

.animalium-gb-form-step[data-step="1"].active {
    grid-template-areas:
        "heading heading"
        "pet-name pet-type"
        "breed gender"
        "nickname birth"
        "death birth-detail"
        "navigation navigation";
}

.animalium-gb-form-step[data-step="1"] > h2 {
    grid-area: heading;
}

.animalium-gb-field--pet-name {
    grid-area: pet-name;
}

.animalium-gb-field--pet-type {
    grid-area: pet-type;
}

.animalium-gb-field--breed {
    grid-area: breed;
}

.animalium-gb-field--gender {
    grid-area: gender;
}

.animalium-gb-field--nickname {
    grid-area: nickname;
}

.animalium-gb-field--birth {
    grid-area: birth;
}

.animalium-gb-field--death {
    grid-area: death;
}

.animalium-gb-field--birth-detail {
    grid-area: birth-detail;
}

.animalium-gb-form-step[data-step="1"] > .animalium-gb-form-nav {
    grid-area: navigation;
    margin-top: 4px;
}

.animalium-gb-form-step h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 3px;
    border-radius: 99px;
    background: var(--jeag-accent);
}

.animalium-gb-form-progress {
    position: relative;
    justify-content: space-between;
    gap: 0;
    max-width: 590px;
    margin: 38px auto 50px;
}

.animalium-gb-form-progress::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 8%;
    left: 8%;
    height: 2px;
    background: var(--jeag-line);
}

.animalium-gb-form-progress__step {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border: 6px solid #fff;
    background: #d9dfda;
    box-shadow: 0 0 0 1px var(--jeag-line);
}

.animalium-gb-form-progress__step::after {
    content: attr(data-label);
    position: absolute;
    top: 31px;
    left: 50%;
    color: var(--jeag-muted);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transform: translateX(-50%);
}

.animalium-gb-form-progress__step.active,
.animalium-gb-form-progress__step.completed {
    background: var(--jeag-brand);
}

.animalium-gb-form-progress__step.active::after {
    color: var(--jeag-brand);
    font-weight: 700;
}

.animalium-gb-field {
    margin-bottom: 24px;
}

.animalium-gb-field label {
    margin-bottom: 8px;
    color: var(--jeag-heading);
}

.animalium-gb-field input[type="text"],
.animalium-gb-field input[type="email"],
.animalium-gb-field input[type="tel"],
.animalium-gb-field input[type="date"],
.animalium-gb-field input[type="number"],
.animalium-gb-field select,
.animalium-gb-field textarea {
    min-height: 48px;
    padding: 11px 14px;
    border-color: var(--jeag-brand-soft);
    background: #fff;
}

.animalium-gb-field input:hover,
.animalium-gb-field select:hover,
.animalium-gb-field textarea:hover {
    border-color: #7fa08c;
}

.animalium-gb-field input:focus,
.animalium-gb-field select:focus,
.animalium-gb-field textarea:focus {
    border-color: var(--jeag-brand);
    box-shadow: 0 0 0 4px rgba(0, 147, 60, 0.08);
}

.animalium-gb-field .description,
.animalium-gb-form > .description {
    color: var(--jeag-muted);
}

.animalium-gb-checkbox {
    padding: 12px 14px;
    border-radius: 7px;
    background: var(--jeag-surface);
}

.animalium-gb-upload-area {
    padding: 36px 25px;
    border-color: rgba(144, 186, 139, 0.8);
    border-radius: 10px;
    background: var(--jeag-surface);
}

.animalium-gb-upload-area:hover,
.animalium-gb-upload-area.dragging {
    border-color: var(--jeag-brand);
    background: #f1f8f2;
}

.animalium-gb-inspiration {
    border-left: 4px solid var(--jeag-accent);
    background: var(--jeag-surface);
}

.animalium-gb-form-nav {
    gap: 14px;
    border-top-color: var(--jeag-line);
}

.animalium-gb-memorial {
    max-width: 920px;
    padding-top: 64px;
    padding-bottom: 70px;
}

.animalium-gb-memorial__header {
    margin-bottom: 46px;
}

.animalium-gb-memorial__image {
    max-height: 560px;
    border-radius: 14px;
    box-shadow: var(--jeag-shadow);
}

.animalium-gb-memorial__subtitle {
    color: var(--jeag-brand);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.animalium-gb-memorial__name {
    color: var(--jeag-brand);
    font-size: clamp(2.5rem, 7vw, 4rem);
}

.animalium-gb-memorial__nickname,
.animalium-gb-memorial__owner,
.animalium-gb-memorial__dates {
    color: var(--jeag-muted);
}

.animalium-gb-memorial__nickname {
    margin-top: -5px;
    font-style: italic;
}

.animalium-gb-memorial__owner {
    margin-top: 10px;
    font-size: 0.9rem;
}

.animalium-gb-memorial__quote {
    margin: 32px 0;
    padding: 22px 26px;
    border-left: 4px solid var(--jeag-accent);
    border-radius: 0 8px 8px 0;
    background: var(--jeag-surface);
    color: var(--jeag-heading);
    font-family: "Roboto Slab", serif;
    font-size: 1.2rem;
}

.animalium-gb-memorial__text {
    font-size: 1.08rem;
    line-height: 1.9;
}

.animalium-gb-memorial__details,
.animalium-gb-candle-section,
.animalium-gb-donation {
    margin: 34px 0;
    padding: 26px;
    border: 1px solid var(--jeag-line);
    border-radius: 12px;
    background: var(--jeag-surface);
}

.animalium-gb-memorial__details p:last-child {
    margin-bottom: 0;
}

.animalium-gb-gallery__grid {
    gap: 14px;
}

.animalium-gb-gallery__item {
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(37, 68, 48, 0.08);
}

.animalium-gb-candle-section {
    text-align: center;
}

.animalium-gb-candle-section h2 {
    margin: 0 0 8px;
    color: var(--jeag-heading);
}

.animalium-gb-candle-section__icon {
    margin: 0 0 10px;
    font-size: 2.4rem;
    filter: drop-shadow(0 5px 8px rgba(231, 161, 67, 0.2));
}

.animalium-gb-candle-section__intro {
    max-width: 560px;
    margin: 0 auto 18px;
    color: var(--jeag-muted);
}

.animalium-gb-candle-section__count {
    margin: 0 0 18px;
    color: var(--jeag-brand);
    font-size: 1rem;
    font-weight: 600;
}

.animalium-gb-candle-form {
    display: none;
    max-width: 430px;
    margin: 22px auto 0;
    padding: 20px;
    border-radius: 9px;
    background: #fff;
    text-align: left;
}

.animalium-gb-candle-feedback {
    min-height: 24px;
    margin: 12px auto 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.animalium-gb-candle-feedback.is-success {
    color: #337247;
}

.animalium-gb-candle-feedback.is-error {
    color: #a23b32;
}

.animalium-gb-candle-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
    text-align: left;
}

.animalium-gb-candle {
    min-height: 150px;
    padding: 18px;
    border: 1px solid rgba(226, 198, 151, 0.45);
    border-radius: 12px;
    background: linear-gradient(145deg, #fffdf8, #f8f1e4);
    box-shadow: 0 8px 20px rgba(91, 69, 37, 0.06);
}

.animalium-gb-candle.is-new {
    animation: jeag-candle-in 0.45s ease both;
}

.animalium-gb-candle__flame {
    display: block;
    margin-bottom: 9px;
    font-size: 1.45rem;
}

.animalium-gb-candle__message {
    margin: 0 0 13px;
    color: #62594e;
    font-family: "Roboto Slab", serif;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.55;
}

.animalium-gb-candle__meta {
    margin: 0;
    color: #8b8175;
    font-size: 0.76rem;
}

@keyframes jeag-candle-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animalium-gb-messages-section {
    margin: 48px 0;
}

.animalium-gb-messages-section > h3 {
    text-align: center;
}

.animalium-gb-messages-list {
    max-height: 420px;
    margin: 24px 0;
    padding-right: 5px;
    overflow-y: auto;
}

.animalium-gb-message {
    margin-bottom: 12px;
    padding: 18px;
    border: 1px solid var(--jeag-line);
    border-radius: 9px;
    background: #fff;
}

.animalium-gb-message-form {
    max-width: 540px;
    margin: 26px auto;
    padding: 24px;
    border-radius: 12px;
    background: var(--jeag-surface);
}

.animalium-gb-donation,
.animalium-gb-closing-quote {
    text-align: center;
}

.animalium-gb-closing-quote {
    margin: 45px 0;
    padding: 28px 20px;
    border-top: 1px solid var(--jeag-line);
    border-bottom: 1px solid var(--jeag-line);
}

.animalium-gb-closing-quote p {
    margin: 0;
    color: var(--jeag-muted);
    font-family: "Roboto Slab", serif;
    font-style: italic;
}

.animalium-gb-notice {
    margin-bottom: 24px;
    padding: 17px 19px;
    border-radius: 8px;
}

.animalium-gb-notice--warning {
    border: 1px solid #e9c974;
    border-left: 4px solid #d6a72d;
    background: #fff9e9;
}

.animalium-gb-edit-summary {
    padding: 22px;
    border: 1px solid var(--jeag-line);
    border-radius: 10px;
    background: var(--jeag-surface);
}

.animalium-gb-edit-summary p:last-child {
    margin-bottom: 0;
}

.animalium-gb-edit-feedback {
    min-height: 26px;
    margin-top: 18px;
    font-weight: 600;
}

.animalium-gb-edit-feedback.is-success {
    color: #337247;
}

.animalium-gb-edit-feedback.is-error {
    color: #a23b32;
}

.animalium-gb-edit-form--complete {
    padding-bottom: 54px;
}

.animalium-gb-edit-form--complete > h1,
.animalium-gb-edit-form--complete > p,
.animalium-gb-edit-form--complete > .animalium-gb-notice {
    display: none;
}

.animalium-gb-completion {
    max-width: 620px;
    margin: 18px auto 0;
    padding: 48px clamp(24px, 7vw, 64px);
    border: 1px solid rgba(144, 186, 139, 0.5);
    border-radius: 16px;
    background: linear-gradient(145deg, #f7fbf7, #edf6ee);
    box-shadow: 0 14px 36px rgba(49, 82, 62, 0.08);
    text-align: center;
}

.animalium-gb-completion__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--jeag-brand);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 147, 60, 0.18);
    font-size: 1.7rem;
    font-weight: 700;
}

.animalium-gb-completion__eyebrow {
    margin: 0 0 8px;
    color: var(--jeag-brand);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.animalium-gb-completion h2 {
    margin: 0 0 14px;
    color: var(--jeag-heading);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.animalium-gb-completion > p:not(.animalium-gb-completion__eyebrow) {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
}

.animalium-gb-completion__note {
    margin-top: 22px !important;
    padding-top: 20px;
    border-top: 1px solid var(--jeag-line);
    color: var(--jeag-muted);
    font-size: 0.9rem;
}

.animalium-gb-danger-zone {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--jeag-line);
    text-align: center;
}

.animalium-gb-danger-zone .jeag-btn-request-deletion {
    padding: 8px 12px;
    border: 0;
    background: none;
    color: #a23b32;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.animalium-gb-loading-state {
    opacity: 0.55;
    pointer-events: none;
}

.animalium-gb-no-results {
    grid-column: 1 / -1;
    padding: 65px 20px;
    border: 1px dashed var(--jeag-line);
    border-radius: 12px;
    background: var(--jeag-surface);
}

/* Isolate plugin controls from Elementor and theme form presets. */
body .animalium-gb-container button.animalium-gb-btn,
body .animalium-gb-container a.animalium-gb-btn,
body .elementor .animalium-gb-container button.animalium-gb-btn,
body .elementor .animalium-gb-container a.animalium-gb-btn {
    appearance: none !important;
    width: auto !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 12px 25px !important;
    border: 2px solid var(--jeag-brand-soft) !important;
    border-radius: 5px !important;
    background-color: var(--jeag-brand-soft) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(80, 125, 91, 0.14) !important;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
}

body .animalium-gb-container button.animalium-gb-btn:hover,
body .animalium-gb-container a.animalium-gb-btn:hover,
body .elementor .animalium-gb-container button.animalium-gb-btn:hover,
body .elementor .animalium-gb-container a.animalium-gb-btn:hover {
    border-color: var(--jeag-brand) !important;
    background-color: var(--jeag-brand) !important;
    color: #fff !important;
}

body .animalium-gb-container button.animalium-gb-btn-small,
body .animalium-gb-container a.animalium-gb-btn-small {
    min-height: 40px !important;
    padding: 9px 17px !important;
    font-size: 0.875rem !important;
}

body .animalium-gb-container button.animalium-gb-btn:disabled {
    opacity: 0.65 !important;
    cursor: wait !important;
    transform: none !important;
}

body .animalium-gb-container button.animalium-gb-btn-outline,
body .animalium-gb-container a.animalium-gb-btn-outline {
    border-color: var(--jeag-brand-soft) !important;
    background-color: #fff !important;
    color: var(--jeag-brand) !important;
    box-shadow: none !important;
}

body .animalium-gb-container button.animalium-gb-btn-outline:hover,
body .animalium-gb-container a.animalium-gb-btn-outline:hover {
    border-color: var(--jeag-brand) !important;
    background-color: var(--jeag-brand) !important;
    color: #fff !important;
}

body .animalium-gb-container input.animalium-gb-input,
body .animalium-gb-container textarea.animalium-gb-textarea,
body .animalium-gb-container input.animalium-gb-search-input,
body .animalium-gb-container select.animalium-gb-select,
body .animalium-gb-container .animalium-gb-field input,
body .animalium-gb-container .animalium-gb-field select,
body .animalium-gb-container .animalium-gb-field textarea {
    appearance: none !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    border: 2px solid var(--jeag-brand-soft) !important;
    border-radius: 5px !important;
    background-color: #fff !important;
    color: var(--jeag-ink) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

body .animalium-gb-container button.animalium-gb-upload-preview__remove,
body .elementor .animalium-gb-container button.animalium-gb-upload-preview__remove {
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    margin: 0 !important;
    padding: 0 0 1px !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    background: rgba(38, 53, 45, 0.72) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(26, 51, 36, 0.18) !important;
    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    text-transform: none !important;
    cursor: pointer !important;
    transform: none !important;
}

body .animalium-gb-container button.animalium-gb-upload-preview__remove:hover,
body .elementor .animalium-gb-container button.animalium-gb-upload-preview__remove:hover {
    border-color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(162, 59, 50, 0.92) !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(90, 36, 31, 0.24) !important;
    transform: scale(1.05) !important;
}

body .animalium-gb-container button.animalium-gb-upload-preview__remove:focus-visible {
    outline: 3px solid rgba(255, 188, 125, 0.9) !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    .animalium-gb-container *,
    .animalium-gb-container *::before,
    .animalium-gb-container *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 700px) {
    .animalium-gb-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .animalium-gb-overview-hero {
        padding: 54px 8px 26px;
    }

    .animalium-gb-filters {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .animalium-gb-search-input,
    .animalium-gb-select {
        width: 100%;
    }

    .animalium-gb-form {
        margin: 25px auto;
        padding: 30px 18px;
        border-radius: 10px;
    }

    .animalium-gb-form-step.active {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .animalium-gb-form-step[data-step="1"].active {
        grid-template-areas:
            "heading"
            "pet-name"
            "pet-type"
            "breed"
            "gender"
            "nickname"
            "birth"
            "death"
            "birth-detail"
            "navigation";
    }

    .animalium-gb-form-step > .animalium-gb-field {
        grid-column: 1;
    }

    .animalium-gb-form-progress__step::after {
        font-size: 0.68rem;
    }

    .animalium-gb-form-nav {
        flex-direction: column-reverse;
    }

    .animalium-gb-form-nav > .animalium-gb-btn {
        width: 100%;
    }

    .animalium-gb-form-nav > span:empty {
        display: none;
    }

    .animalium-gb-memorial {
        padding-top: 35px;
    }

    .animalium-gb-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .animalium-gb-actions .animalium-gb-btn {
        width: 100%;
        text-align: center;
    }

    .animalium-gb-candle-list {
        grid-template-columns: 1fr;
    }

    body .animalium-gb-container .animalium-gb-form-nav > .animalium-gb-btn,
    body .animalium-gb-container .animalium-gb-actions > .animalium-gb-btn {
        width: 100% !important;
    }
}
