/* ==========================================================================
   KI PR Plugin – Frontend Styles
   ========================================================================== */

/* --- Seitenüberschrift auf Plugin-Seiten ausblenden --- */
body.kipr-page .entry-title,
body.kipr-page .page-title,
body.kipr-page .page-header {
    display: none !important;
}

/* --- Akzentfarbe (hardcoded #005c90, passend zu MH Magazine Navigation) --- */
:root {
    --kipr-accent:     #005c90;
    --kipr-accent-dark:#004a78;
    --kipr-accent-rgb: 0,92,144;
}

/* Alle Buttons: Farbe direkt setzen – kein PHP nötig */
html body .kipr-btn,
html body a.kipr-btn,
html body button.kipr-btn,
html body .kipr-btn.kipr-btn--primary,
html body .kipr-btn.kipr-btn--secondary,
html body .kipr-btn.kipr-btn--ghost {
    background: #005c90 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    transform: none !important;
}
html body .kipr-btn:hover,
html body a.kipr-btn:hover,
html body button.kipr-btn:hover,
html body .kipr-btn.kipr-btn--primary:hover,
html body .kipr-btn.kipr-btn--secondary:hover,
html body .kipr-btn.kipr-btn--ghost:hover {
    background: #005c90 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}
html body .kipr-btn.kipr-btn--danger,
html body .kipr-btn.kipr-btn--danger:hover {
    background: #c53030 !important;
    color: #ffffff !important;
    border: none !important;
    transform: none !important;
}

/* Basis-Reset fuer den Plugin-Bereich */
.kipr-wrap * {
    box-sizing: border-box;
}

/* ---- Karte (Login / Registrierung) ---- */
.kipr-card {
    max-width: 480px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.kipr-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a202c;
}
.kipr-card__subtitle {
    color: #718096;
    margin: 0 0 28px;
    font-size: .95rem;
}
.kipr-card__footer {
    text-align: center;
    margin-top: 20px;
    font-size: .9rem;
    color: #718096;
}

/* ---- Formular ---- */
.kipr-form__group {
    margin-bottom: 18px;
}
.kipr-form__group--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kipr-form__label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}
.kipr-form__label small {
    font-weight: 400;
    color: #718096;
}
.kipr-form__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
    background: #f7fafc;
}
.kipr-form__input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,.2);
    background: #fff;
}
.kipr-form__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    cursor: pointer;
}

/* ---- Buttons ---- */
.kipr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1.4;
}
.kipr-btn:active { opacity: .85; }

.kipr-btn--primary {
    background: #1a202c;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}
.kipr-btn--primary:hover { background: #1a202c; color: #fff; }

.kipr-btn--secondary {
    background: #1a202c;
    color: #fff;
    border: none;
}
.kipr-btn--secondary:hover { background: #1a202c; color: #fff; }

.kipr-btn--ghost {
    background: #1a202c;
    color: #fff;
    border: none;
}
.kipr-btn--ghost:hover { background: #1a202c; color: #fff; }

.kipr-btn--danger {
    background: #c53030;
    color: #fff;
    border: none;
}
.kipr-btn--danger:hover { background: #c53030; color: #fff; }

.kipr-btn--sm {
    padding: 6px 12px;
    font-size: .8rem;
    border-radius: 6px;
}

/* ---- Nachrichten / Alerts ---- */
.kipr-messages {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
}
.kipr-messages.is-error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
}
.kipr-messages.is-success {
    background: #f0fff4;
    border: 1px solid #68d391;
    color: #276749;
}
.kipr-messages ul { margin: 6px 0 0 16px; padding: 0; }

/* ---- Dashboard ---- */
.kipr-dashboard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}
.kipr-dashboard__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px;
}
.kipr-dashboard__subtitle {
    color: #718096;
    margin: 0;
}
.kipr-dashboard__header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.kipr-dashboard__header-right .kipr-btn--primary {
    width: auto;
    padding: 10px 20px;
    font-size: .9rem;
}

/* ---- Statistik-Kacheln ---- */
.kipr-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.kipr-stat-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.kipr-stat-card--published { border-color: #68d391; background: #f0fff4; }
.kipr-stat-card--pending   { border-color: #fbd38d; background: #fffbeb; }
.kipr-stat-card--draft     { border-color: #a0aec0; background: #f7fafc; }

.kipr-stat-card__number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}
.kipr-stat-card__label {
    display: block;
    font-size: .8rem;
    color: #718096;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---- Archiv / Tabelle ---- */
.kipr-archive__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 16px;
}
.kipr-archive__empty {
    text-align: center;
    padding: 60px 20px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e0;
    color: #718096;
}
.kipr-archive__empty .kipr-btn--primary {
    width: auto;
    display: inline-flex;
    margin-top: 16px;
    padding: 10px 24px;
}
.kipr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.kipr-table th {
    background: #f7fafc;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.kipr-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}
.kipr-table tr:last-child td { border-bottom: none; }
.kipr-table tr:hover td { background: #f7fafc; }

.kipr-table__title { font-weight: 600; color: #2d3748; max-width: 300px; }
.kipr-table__date  { color: #718096; white-space: nowrap; }
.kipr-table__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Status-Badges ---- */
.kipr-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
    background: #edf2f7;
    color: #4a5568;
}
.kipr-badge--published { background: #c6f6d5; color: #22543d; }
.kipr-badge--pending   { background: #feebc8; color: #7b341e; }
.kipr-badge--draft     { background: #e2e8f0; color: #4a5568; }

/* ---- Links ---- */
.kipr-link { color: var(--kipr-accent); text-decoration: none; font-size: .875rem; }
.kipr-link:hover { text-decoration: underline; }

/* ---- Google News Feed Hinweis ---- */
.kipr-feed-hint {
    margin-top: 28px;
    padding: 14px 18px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    font-size: .875rem;
    color: #276749;
    line-height: 1.6;
}
.kipr-feed-hint a { color: #276749; font-weight: 600; }

/* ---- Halbfette Zwischenüberschriften in Pressemitteilungen ---- */
.kipr-pressemitteilung h1,
.kipr-pressemitteilung h2,
.kipr-pressemitteilung h3,
.kipr-pressemitteilung h4,
.kipr-pressemitteilung h5,
.kipr-pressemitteilung h6,
.entry-content .kipr-is-pr h1,
.entry-content .kipr-is-pr h2,
.entry-content .kipr-is-pr h3,
.entry-content .kipr-is-pr h4 {
    font-weight: 600 !important;
}
/* Breiter Fallback: alle Headings in PR-Beiträgen (via body-class) */
body.kipr-pr-post h1,
body.kipr-pr-post h2,
body.kipr-pr-post h3,
body.kipr-pr-post h4,
body.kipr-pr-post h5,
body.kipr-pr-post h6 {
    font-weight: 600;
}

/* ---- Pressekontakt-Block am Ende der PM ---- */
.kipr-pressekontakt {
    margin-top: 36px;
    padding: 20px 24px;
    background: #f7fafc;
    border-left: 4px solid var(--kipr-accent);
    border-radius: 0 8px 8px 0;
    font-size: .9rem;
    line-height: 1.7;
}
.kipr-pressekontakt h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #718096;
    margin: 0 0 10px;
    font-weight: 600 !important;
}
.kipr-pressekontakt p {
    margin: 0;
    color: #2d3748;
}
.kipr-pressekontakt a {
    color: var(--kipr-accent);
    text-decoration: none;
}
.kipr-pressekontakt a:hover { text-decoration: underline; }

/* ---- Profil-Seite ---- */
.kipr-profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.kipr-profile-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf2f7;
}
.kipr-profile-section:last-of-type { border-bottom: none; }
.kipr-profile-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 16px;
}
.kipr-contact-preview {
    background: #f7fafc;
    border-left: 4px solid var(--kipr-accent);
    border-radius: 0 6px 6px 0;
    padding: 14px 18px;
    font-size: .875rem;
    line-height: 1.8;
    color: #2d3748;
    font-family: monospace;
    white-space: pre-wrap;
}

/* ---- Kontaktblock-Editor in Schritt 5 ---- */
.kipr-contact-block-editor {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}
.kipr-contact-block-editor__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.kipr-contact-block-editor__header h3 {
    font-size: .95rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}
.kipr-contact-block-editor__header small {
    font-weight: 400;
    color: #718096;
}

/* ---- CAPTCHA ---- */
.kipr-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.kipr-captcha__question {
    background: #edf2f7;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3748;
    white-space: nowrap;
    letter-spacing: .04em;
    min-width: 110px;
    text-align: center;
}
.kipr-captcha__input {
    max-width: 100px !important;
    text-align: center;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}
.kipr-captcha__refresh {
    background: none;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.kipr-captcha__refresh:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

/* ---- Konto-Seite ---- */
.kipr-account-info {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.kipr-account-info__item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}
.kipr-account-info__label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #a0aec0;
    font-weight: 600;
}
.kipr-account-info__value {
    font-weight: 600;
    color: #2d3748;
    font-size: .95rem;
}
.kipr-account-confirm-box {
    background: #fffbeb;
    border: 1px solid #f6e05e;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.kipr-account-confirm-box .kipr-form__group {
    margin-bottom: 0;
}

/* ---- DOI-Hinweis in Register-Erfolg ---- */
.kipr-messages.is-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: .95rem;
    line-height: 1.6;
}
.kipr-messages.is-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: .95rem;
    line-height: 1.6;
}
.kipr-messages ul { margin: 6px 0 0 18px; padding: 0; }
.kipr-messages li { margin-bottom: 4px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .kipr-card { padding: 24px 20px; margin: 20px auto; }
    .kipr-dashboard__header { flex-direction: column; }
    .kipr-table th:nth-child(2),
    .kipr-table td:nth-child(2) { display: none; }
}

/* ---- Breite Karte (Profil / Einstellungen) ---- */
.kipr-card--wide {
    max-width: 860px;
}

/* ---- Formular-Zeile mit Spalten ---- */
.kipr-form__row--cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
@media ( max-width: 600px ) {
    .kipr-form__row--cols {
        grid-template-columns: 1fr;
    }
}

/* ---- Volles Formularfeld (Textarea Adresse) ---- */
.kipr-form__group--full {
    grid-column: 1 / -1;
}

/* ---- Sticky Save-Bar ---- */
.kipr-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 14px 0;
    margin-top: 32px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.kipr-save-bar .kipr-btn--primary {
    min-width: 200px;
}

/* ---- Browser-eigene Icons in Eingabefeldern ausblenden ---- */
.kipr-form__input[type="email"]::-webkit-contacts-auto-fill-button,
.kipr-form__input[type="tel"]::-webkit-contacts-auto-fill-button,
.kipr-form__input[type="url"]::-webkit-credentials-auto-fill-button,
.kipr-form__input::-webkit-inner-spin-button,
.kipr-form__input::-webkit-calendar-picker-indicator {
    display: none !important;
    visibility: hidden !important;
}

/* ---- Select-Feld ---- */
.kipr-form__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ---- Primärer Button ohne Hover-Effekt ---- */
.kipr-btn--no-hover:hover {
    background: var(--kipr-accent) !important;
    border-color: var(--kipr-accent) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ---- Hinweistext unter Formularfeldern ---- */
.kipr-form__hint {
    font-size: .9rem;
    color: #718096;
    margin: 4px 0 0;
    line-height: 1.4;
}
/* Gilt auch für <small> innerhalb von kipr-account-info */
.kipr-account-info .kipr-form__hint,
.kipr-account-info small {
    font-size: .9rem;
    color: #4a5568;
}

/* ---- Keine Hover-Effekte in Save-Bar ---- */
.kipr-save-bar .kipr-btn--primary:hover {
    background: var(--kipr-accent) !important;
    color: #fff !important;
}

/* ---- FINAL OVERRIDE: Kein Hover, feste Farbe ---- */
html body .kipr-btn,
html body a.kipr-btn,
html body button.kipr-btn {
    background: #1a202c !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
}
html body .kipr-btn:hover,
html body .kipr-btn:focus,
html body .kipr-btn:active,
html body a.kipr-btn:hover,
html body button.kipr-btn:hover {
    background: #1a202c !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: none !important;
    opacity: 1 !important;
}
html body .kipr-btn--danger,
html body .kipr-btn--danger:hover {
    background: #c53030 !important;
    color: #fff !important;
}

/* Offline nehmen Button */
.kipr-btn--warning {
    background: #d97706 !important;
    color: #fff !important;
    border: none !important;
}
.kipr-btn--warning:hover {
    background: #b45309 !important;
    color: #fff !important;
}

/* Dashboard Tabelle – Vorschaubild */
.kipr-table__thumb-col { width: 60px; padding: 0 !important; }
.kipr-table__thumb { width: 60px; padding: 6px 8px 6px 0 !important; }
.kipr-table__thumb img {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    border: 1px solid #e2e8f0;
}
.kipr-table__thumb-placeholder {
    width: 56px;
    height: 40px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #a0aec0;
}
