/* ------------------------------------------------------------------------------- */
.label-legacy,
.label-beta,
.label-free,
.label-pro {
    color: white;
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 0.75em;
    margin-left: 10px;
}
.label-beta {
    background-color: #f0ad4e;
}
.label-free {
    background-color: #53b30f;
}
.label-pro {
    background-color: #068bf0;
}
.label-legacy {
    background-color: #c22d16;
}
/* ------------------------------------------------------------------------------- */
.color_red {
    color: #a31919;
}
.color_blue {
    color: #007bff;
}
/* ------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------- */
.card-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.card-row.card-row-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.card {
    max-width: 600px;
    break-inside: avoid-column;
    word-wrap: break-word; /* Allows long words to break and wrap to the next line */
    overflow-wrap: break-word;
}
.backup-card {
    max-width: 700px;
}

.card img,
.card input,
.card textarea,
.card select {
    max-width: 100%; /* Ensures that these elements do not exceed the width of their parent */
    height: auto; /* Maintains the aspect ratio for images */
    box-sizing: border-box; /* Includes padding and border in the width calculation for form fields */
}
/* ------------------------------------------------------------------------------- */
/* Ensure buttons/forms styling remains consistent */
.ter-kal-button-group {
    display: flex; /* Changed from inline-flex to allow full width */
    gap: 0.3rem; /* Reduced gap for better spacing */
    align-items: stretch; /* Ensures all buttons have same height */
    flex-wrap: wrap; /* Allow wrapping on narrow screens */
}

.ter-kal-button-form {
    display: flex; /* Added: make form itself flex container */
    flex: 1 1 0; /* Equal width distribution */
    min-width: 0; /* Allow shrinking below content width */
}

/* Make buttons inside forms take full width */
.ter-kal-button-form > .button {
    flex: 1; /* Take full width of parent form */
    white-space: normal; /* Changed: allow text wrapping instead of ellipsis */
    text-align: center; /* Center button text */
     /*padding: 6px 10px; Ensure adequate padding */
    word-wrap: break-word; /* Break long words if needed */
    /*min-height: 32px;  Maintain minimum button height */
}

/* Icon spacing inside buttons (Global override for all standard WP buttons with dashicons) */
.button .dashicons {
    vertical-align: middle;
    margin-top: -2px; /* Pulls the icon up slightly to perfectly align with text vertical-center */
    margin-right: 5px;
}

.ter-kal-button-form .button-primary {
  background-color: #28a745;
}
.ter-kal-button-form .button-primary:hover {
  background-color: #8fdf82;
}

/* ------------------------------------------------------------------------------- */
.backup-item {
    margin: 15px 0;
}
.backup-item h3 {
    margin: 0 0 8px 0;
}
.backup-divider {
    margin: 15px 0;
    border-color: #ddd;
}
/* ------------------------------------------------------------------------------- */
.card-header .tk_title_icon {
    font-size: 2rem;
}

#ter_kal_google_calendar_id,
#ter_kal_google_api_key {
  width:100%;
}
/* ------------------------------------------------------------------------------- */
/* Styling for Termin-Kalender Menu Labels */
#adminmenu .wp-submenu li a[href*="ter_kal_label_"] {
    pointer-events: none;      /* Verhindert Klicks */
    cursor: default;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10px;
    color: #a7aaad;            /* WP Admin Grauton für Metadaten */
    padding-top: 15px;
    padding-bottom: 5px;
    letter-spacing: 0.5px;
}

/* Optional: Verstecke den Hover-Effekt für diese speziellen Labels */
#adminmenu .wp-submenu li a[href*="ter_kal_label_"]:hover,
#adminmenu .wp-submenu li a[href*="ter_kal_label_"]:focus {
    background: transparent !important;
    color: #a7aaad !important;
}

/* Erster Trenner braucht weniger Padding oben */
#adminmenu .wp-submenu li:first-child a[href*="ter_kal_label_"] {
    padding-top: 5px;
}



/* ------------------------------------------------------------------------------- */
@media (max-width: 780px) {
    .card-row.card-row-grid,
    .card-row {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    /* Stack buttons vertically on mobile */
    .ter-kal-button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 0;
    }

    .ter-kal-button-form {
        flex: 1 1 auto; /* Allow natural width on mobile */
        width: 100%; /* Full width on mobile */
    }

    .ter-kal-button-form > .button {
        font-size: 0.8rem;
        padding: 0.1rem 0.2rem;
    }

    #ter_kal_google_calendar_id,
    #ter_kal_google_api_key {
      font-size: 0.6rem;
    }

}
/* ------------------------------------------------------------------------------- */
/* Modern Card Layout (Support, Rating, Upgrades) */
.tk-modern-wrapper { 
    max-width: 600px; 
    margin: 30px auto; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}
.tk-modern-card { 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 35px; 
    text-align: left; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}
.tk-modern-card h1 { 
    margin-top: 0; 
    text-align: center; 
}
/* ------------------------------------------------------------------------------- */
/* PRO Feature Grid Layout */
.tk-feature-section-title {
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #1d2327;
}
.tk-feature-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}
.tk-feature-item {
    text-align: center;
    padding: 0 15px;
}
.tk-feature-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #068bf0;
    margin: 0 auto 12px auto;
    display: block;
}
.tk-feature-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 6px;
    color: #2271b1;
}
.tk-feature-desc {
    color: #50575e;
    line-height: 1.5;
}
.tk-pro-badge-small {
    background-color: #068bf0;
    color: white;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 0.7em;
    vertical-align: text-bottom;
    margin-left: 6px;
}
.tk-feature-divider {
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
    margin: 40px auto;
    max-width: 80%;
}
/* ------------------------------------------------------------------------------- */
/* STANDARDIZED ADMIN UI COMPONENT CLASSES (Technical Debt Reduction) */
/* ------------------------------------------------------------------------------- */

/* Layout & Containers */
.termin-kalender-admin-container {
    max-width: 900px;
}
.termin-kalender-admin-card-body {
    padding: 30px;
}
.termin-kalender-admin-card-body-compact {
    padding: 15px 30px;
}
.termin-kalender-admin-flex-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.termin-kalender-admin-flex-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Notice & Setup Boxes */
.termin-kalender-admin-notice-info {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.termin-kalender-admin-notice-warning {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.termin-kalender-admin-box-light {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    margin-bottom: 20px;
}
.termin-kalender-admin-box-white {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    margin-bottom: 25px;
}
.termin-kalender-admin-code-box {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
}

/* Typography */
.termin-kalender-admin-page-title {
    font-size: 2em;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 20px;
}
.termin-kalender-admin-h2 {
    margin-top: 0;
    color: #2271b1;
    font-size: 1.4em;
    margin-bottom: 15px;
}
.termin-kalender-admin-h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
    font-size: 1.2em;
}
.termin-kalender-admin-h4 {
    margin-top: 0;
    font-size: 1.1em;
    color: #1d2327;
    margin-bottom: 10px;
}
.termin-kalender-admin-text-lead {
    font-size: 1.1em;
    color: #50575e;
    margin-bottom: 20px;
}
.termin-kalender-admin-text-muted {
    color: #50575e;
    margin-bottom: 15px;
}

/* Utilities */
.termin-kalender-admin-input-full {
    flex-grow: 1;
    max-width: none;
    padding: 10px;
    font-size: 14px;
}
.termin-kalender-admin-icon-inline {
    position: relative;
    top: 4px;
    margin-right: 5px;
}
/* ------------------------------------------------------------------------------- */
/* Active Pages Overview Classes */
.termin-kalender-overview-card {
    margin-bottom: 30px;
}

.termin-kalender-overview-h3 {
    margin-bottom: 20px;
}

.termin-kalender-overview-p {
    margin-bottom: 15px;
}

.termin-kalender-overview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.termin-kalender-overview-list-item {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.termin-kalender-overview-list-title {
    color: #1d2327;
    font-size: 14px;
}

.termin-kalender-overview-badge-legacy {
    background: #fdf2f2;
    color: #d63638;
    border: 1px solid #d63638;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.termin-kalender-overview-badge-active {
    background: #edfaee;
    color: #00a32a;
    border: 1px solid #00a32a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.termin-kalender-overview-badge-type {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #8c8f94;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.termin-kalender-overview-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.termin-kalender-overview-actions-separator {
    color: #ccc;
}

.termin-kalender-overview-warning {
    flex-basis: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #d63638;
}

.termin-kalender-overview-empty {
    color: #50575e;
    font-style: italic;
}
/* ------------------------------------------------------------------------------- */