/* =========================================================================
   Wrapper Card Styling (Coach Dom Design System)
   ========================================================================= */

.wrapper-card {
    width: 100%;
    margin: 2rem auto;
    background-color: var(--color-paper, #f5f3ee);
    border: 1px solid var(--color-rule, #c9c3b3);
    border-radius: 2px; /* Editorial sharp corners */
    box-shadow: 0 10px 30px rgba(20, 19, 15, 0.05);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wrapper-card.is-hoverable:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(20, 19, 15, 0.08);
}

/* Header Section */
.wrapper-card__header {
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--color-rule, #c9c3b3);
}

.wrapper-card__title {
    margin: 0;
    font-family: var(--font-serif, "Newsreader", serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-ink, #14130f);
    display: flex;
    align-items: center;
    gap: 12px;
}

.wrapper-card__icon {
    color: var(--color-rust, #a45a3f);
    font-size: 2rem !important;
}

/* Body Section */
.wrapper-card__body {
    padding: 2.5rem;
}

/* Auto-Saving Info */
.wrapper-auto-save {
    position: absolute;
    top: 1.5rem;
    right: 2.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border-radius: 2px;
    z-index: 10;
}

.wrapper-auto-save.is-active {
    color: #059669;
    background-color: rgba(5, 150, 105, 0.05);
}

.wrapper-auto-save.is-inactive {
    color: var(--color-accent, #5a564d);
    background-color: var(--color-paper-2, #ebe7dd);
}

/* Pagination / Navigation */
.wrapper-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-rule, #c9c3b3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wrapper-nav__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Loader Styling */
.wrapper-loader {
    width: 60px;
    height: 2px;
    background: var(--color-rule, #c9c3b3);
    position: relative;
    overflow: hidden;
    display: none;
}

.wrapper-loader::after {
    content: "";
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-rust, #a45a3f);
    animation: wrapperLoaderSlide 1.5s infinite linear;
}

@keyframes wrapperLoaderSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading state for button */
.is-loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

/* Injected Info Links */
.dt-injected-field-link {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 10px;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.625rem;
    color: var(--color-rust, #a45a3f);
    background-color: transparent;
    border: 1px solid var(--color-rust, #a45a3f);
    border-radius: 2px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.dt-injected-field-link:hover {
    background-color: var(--color-rust, #a45a3f);
    color: var(--color-paper, #f5f3ee);
}

.dt-injected-field-link .material-icons-outlined {
    font-size: 10px;
    margin-right: 4px;
}

/* GravityView Specific Overrides */
.wrapper-card .gv-edit-entry-title {
    display: none !important;
}

/* Responsive Tweak */
@media (max-width: 768px) {
    .wrapper-card__header,
    .wrapper-card__body {
        padding: 1.5rem;
    }
    
    .wrapper-auto-save {
        position: static;
        margin-bottom: 1rem;
        width: fit-content;
    }
    
    .wrapper-card__title {
        font-size: 1.5rem;
    }
}