/* 
 * Bloczek "Detale Motywu" (wstawka do The Content) 
 */

.mk-tf-theme-details {
    background: var(--wp--custom--color--surface, var(--wp--preset--color--surface, #ffffff));
    border: 1px solid var(--wp--custom--color--surface-border, var(--wp--preset--color--border, #e5e5e5));
    border-radius: var(--wp--custom--border-radius--large, 16px);
    padding: 2.5rem;
    margin: 0 auto 3rem auto;
    color: var(--wp--custom--color--on-surface, var(--wp--preset--color--text, #333333));
    box-shadow: var(--wp--custom--shadow--soft, 0 4px 10px rgba(0,0,0,0.05));
    font-family: var(--wp--preset--font-family--system-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
    width: 100%;
    max-width: var(--wp--style--global--wide-size, 1280px);
    box-sizing: border-box;
}

:where(.alignwide) > .mk-tf-theme-details,
.mk-tf-theme-details.alignwide {
    max-width: var(--wp--style--global--wide-size, 1280px);
}

:where(.alignfull) > .mk-tf-theme-details,
.mk-tf-theme-details.alignfull {
    max-width: none;
}

.mk-tf-td-hero {
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--wp--custom--color--surface-border, #e5e5e5);
}

.mk-tf-td-img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

.mk-tf-td-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.mk-tf-td-main-info {
    flex: 1;
}

.mk-tf-td-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mk-tf-td-title a:hover {
    color: var(--wp--preset--color--primary, #2563eb);
}

.mk-tf-td-rating-badge {
    display: inline-block;
    background: var(--wp--custom--color--surface-alt, var(--wp--preset--color--surface-alt, #f7f7f7));
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--wp--custom--color--surface-border, var(--wp--preset--color--border, #e5e5e5));
    margin-bottom: 1rem;
    color: var(--wp--custom--color--on-surface, var(--wp--preset--color--text, #333333));
}

.mk-tf-td-rating-badge strong {
    color: var(--wp--preset--color--primary, #2563eb);
    font-size: 1.1rem;
}

.mk-tf-td-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mk-tf-td-specs li {
    font-size: 0.95rem;
    color: var(--wp--custom--color--on-surface, var(--wp--preset--color--text, #333333));
}

.mk-tf-td-specs span {
    color: var(--wp--custom--color--on-surface-muted, var(--wp--preset--color--text-muted, #777777));
}

.mk-tf-td-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.mk-tf-td-btn {
    display: inline-block;
    padding: 0.75rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    cursor: pointer;
}

.mk-tf-td-btn--primary {
    background-color: var(--wp--preset--color--primary, #2563eb);
    color: #fff !important;
    border: 1px solid var(--wp--preset--color--primary, #2563eb);
}

.mk-tf-td-btn--primary:hover {
    background-color: var(--wp--custom--color--on-surface, #333333) !important;
    color: var(--wp--custom--color--surface, #ffffff) !important;
    border-color: var(--wp--custom--color--on-surface, #333333) !important;
}

.mk-tf-td-btn--secondary {
    background-color: transparent;
    color: var(--wp--custom--color--on-surface, #333333) !important;
    border: 1px solid var(--wp--custom--color--surface-border, #e5e5e5);
}

.mk-tf-td-btn--secondary:hover {
    background-color: var(--wp--custom--color--on-surface, #333333) !important;
    color: var(--wp--custom--color--surface, #ffffff) !important;
    border-color: var(--wp--custom--color--on-surface, #333333) !important;
}

.mk-tf-td-editorial-lead {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--wp--custom--color--on-surface-muted, #555);
}

/* Performance PSI */
.mk-tf-td-performance-box {
    background: var(--wp--custom--color--surface-alt, var(--wp--preset--color--surface-alt, #fcfcfc));
    border: 1px solid var(--wp--custom--color--surface-border, var(--wp--preset--color--border, #eee));
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.mk-tf-td-box-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.15rem;
    color: var(--wp--custom--color--on-surface, #333);
}

/* Performance PSI Optimized V2 */
.mk-tf-td-psi-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .mk-tf-td-psi-grid-v2 {
        grid-template-columns: 1fr;
    }
}

.mk-tf-td-psi-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--wp--custom--color--surface, #fff);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--wp--custom--color--surface-border, #eee);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mk-tf-td-psi-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mk-tf-td-psi-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mk-tf-td-psi-main .label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--custom--color--on-surface-muted, #999);
    letter-spacing: 0.05em;
}

.mk-tf-td-psi-circle {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border-width: 4px;
    border-style: solid;
}

.mk-tf-td-psi-circle--green { border-color: #2ea44f; color: #2ea44f; background: rgba(46, 164, 79, 0.05); }
.mk-tf-td-psi-circle--orange { border-color: #d4a017; color: #d4a017; background: rgba(212, 160, 23, 0.05); }
.mk-tf-td-psi-circle--red { border-color: #cf222e; color: #cf222e; background: rgba(207, 34, 46, 0.05); }

.mk-tf-td-psi-metrics-list {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--wp--custom--color--surface-border, #eee);
}

.mk-tf-td-psi-metrics-list .metric {
    font-size: 0.85rem;
    color: var(--wp--custom--color--on-surface-muted, #888);
}

.mk-tf-td-psi-metrics-list .metric span {
    font-weight: 600;
    margin-right: 0.25rem;
}

.mk-tf-td-psi-metrics-list .metric strong {
    font-size: 1.1rem;
    color: var(--wp--custom--color--on-surface, #333);
}

/* Tooltips */
.mk-tf-tooltip {
    position: relative;
    cursor: help;
}

.mk-tf-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #111;
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    width: 220px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-weight: 400;
}

.mk-tf-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border: 6px solid transparent;
    border-top-color: #111;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.mk-tf-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.mk-tf-tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
}

.mk-tf-td-psi-metrics {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.mk-tf-td-psi-note {
    font-size: 0.85rem;
    color: #999;
}

/* Editorial Sections */
.mk-tf-td-editorial-box {
    margin-bottom: 2rem;
}

.mk-tf-td-editorial-box h5 {
    margin: 0 0 0.8rem 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.mk-tf-td-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px dashed var(--wp--custom--color--surface-border, var(--wp--preset--color--border, #e5e5e5));
    border-bottom: 1px dashed var(--wp--custom--color--surface-border, #e5e5e5);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.mk-tf-td-comparative-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.mk-tf-td-strength h5 { color: #27ae60; }
.mk-tf-td-limitation h5 { color: #e74c3c; }

.mk-tf-td-verdict-box {
    background: color-mix(in srgb, var(--wp--preset--color--primary, #2563eb), transparent 93%);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary, #2563eb), transparent 75%);
    padding: 2rem;
    border-radius: 12px;
}

.mk-tf-td-verdict-box h4 {
    margin: 0 0 1rem 0;
    color: var(--wp--preset--color--primary, #004085);
}


.mk-tf-td-pros h4, .mk-tf-td-cons h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--wp--custom--color--on-surface, var(--wp--preset--color--text, #333333));
}

.mk-tf-td-pros ul, .mk-tf-td-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mk-tf-td-pros li, .mk-tf-td-cons li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 0.5rem;
    color: var(--wp--custom--color--on-surface, var(--wp--preset--color--text, #333333));
}

.mk-tf-td-pros li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.mk-tf-td-cons li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

@media(max-width: 768px) {
    .mk-tf-td-header {
        flex-direction: column;
        text-align: center;
    }
    .mk-tf-td-specs {
        justify-content: center;
    }
    .mk-tf-td-pros-cons {
        grid-template-columns: 1fr;
    }
}
