/*--------------------------------------------------------------
# Compatibility Section (Етап 6)
--------------------------------------------------------------*/

/* Signs grid on archive page */
.aw-compat-signs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0 30px;
}

.aw-compat-sign-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border: 1px solid #e0d8cf;
    border-radius: var(--aw-border-radius, 8px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aw-compat-sign-card:hover {
    border-color: #8b6db5;
    box-shadow: 0 2px 8px rgba(139, 109, 181, 0.15);
    text-decoration: none;
    color: inherit;
}

.aw-compat-sign-symbol {
    font-size: 2em;
    line-height: 1;
    margin-bottom: 6px;
}

.aw-compat-sign-name {
    font-size: 0.85em;
    font-weight: 600;
}

/* Compatibility matrix table */
.aw-compat-matrix-wrap {
    overflow-x: auto;
    margin: 20px 0 30px;
    -webkit-overflow-scrolling: touch;
}

.aw-compat-matrix {
    border-collapse: collapse;
    width: 100%;
    min-width: 700px;
    font-size: 0.8em;
}

.aw-compat-matrix th,
.aw-compat-matrix td {
    border: 1px solid #e0d8cf;
    padding: 6px 4px;
    text-align: center;
    white-space: nowrap;
}

.aw-compat-matrix thead th {
    background: #f5f0eb;
    font-size: 1.2em;
    padding: 8px 4px;
}

.aw-compat-matrix tbody th {
    background: #f5f0eb;
    text-align: left;
    padding: 6px 8px;
    font-weight: 600;
}

.aw-compat-cell a {
    display: block;
    padding: 4px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.aw-compat-cell a:hover {
    text-decoration: underline;
}

.aw-compat-high { background-color: #e8f5e9; }
.aw-compat-mid  { background-color: #fff8e1; }
.aw-compat-low  { background-color: #fce4ec; }

/* Hero section for pair pages */
.aw-compat-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f5f0eb 0%, #ede4f5 100%);
    border-radius: var(--aw-border-radius, 8px);
}

.aw-compat-hero__sign {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.aw-compat-hero__symbol {
    font-size: 3em;
    line-height: 1;
}

.aw-compat-hero__name {
    font-size: 1.1em;
    font-weight: 700;
}

.aw-compat-hero__separator {
    font-size: 1.8em;
    color: #8b6db5;
    font-weight: 700;
}

/* Compatibility percentage bars */
.aw-compat-bars {
    margin: 0 0 30px;
}

.aw-compat-bar {
    margin-bottom: 14px;
}

.aw-compat-bar__label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.aw-compat-bar__value {
    font-weight: 700;
}

.aw-compat-bar__track {
    height: 12px;
    background: #f0ebe5;
    border-radius: 6px;
    overflow: hidden;
}

.aw-compat-bar__fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.aw-compat-bar--love       { background: linear-gradient(90deg, #e91e63, #f06292); }
.aw-compat-bar--friendship { background: linear-gradient(90deg, #2196f3, #64b5f6); }
.aw-compat-bar--work       { background: linear-gradient(90deg, #4caf50, #81c784); }
.aw-compat-bar--overall    { background: linear-gradient(90deg, #8b6db5, #b39ddb); }

.aw-compat-bar--total {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e0d8cf;
}

.aw-compat-bar--total .aw-compat-bar__track {
    height: 16px;
    border-radius: 8px;
}

.aw-compat-bar--total .aw-compat-bar__fill {
    border-radius: 8px;
}

/* Cross-links */
.aw-compat-crosslinks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 30px 0;
    padding: 20px;
    background: #f9f7f4;
    border-radius: var(--aw-border-radius, 8px);
}

.aw-compat-crosslinks--full {
    grid-column: 1 / -1;
}

.aw-compat-crosslinks h3 {
    margin: 0 0 10px;
    font-size: 1em;
}

.aw-compat-crosslinks ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.aw-compat-crosslinks li {
    font-size: 0.9em;
}

.aw-compat-crosslinks a {
    text-decoration: none;
    color: #5a4a6b;
}

.aw-compat-crosslinks a:hover {
    color: #8b6db5;
    text-decoration: underline;
}

/* Back link */
.aw-compat-back {
    margin: 24px 0;
    font-size: 0.95em;
}

.aw-compat-back a {
    color: #8b6db5;
    text-decoration: none;
}

.aw-compat-back a:hover {
    text-decoration: underline;
}

/* Product cross-links on CPT pages (15.7) */
.aw-product-crosslinks {
    margin: 30px 0;
    padding: 20px;
    background: #f9f7f4;
    border-radius: var(--aw-border-radius, 8px);
}

.aw-product-crosslinks h3 {
    margin: 0 0 16px;
    font-size: 1.05em;
}

.aw-product-crosslinks__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.aw-product-crosslinks__item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--aw-border-radius, 8px);
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.aw-product-crosslinks__item:hover {
    box-shadow: 0 4px 16px rgba(90, 74, 107, 0.12);
}

.aw-product-crosslinks__img img {
    width: 100%;
    height: auto;
    display: block;
}

.aw-product-crosslinks__info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aw-product-crosslinks__name {
    font-size: 0.88em;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aw-product-crosslinks__price {
    font-size: 0.85em;
    color: #8b6db5;
    font-weight: 600;
}

.aw-product-crosslinks__more {
    margin-top: 12px;
    text-align: right;
    font-size: 0.9em;
}

.aw-product-crosslinks__more a {
    color: #8b6db5;
    text-decoration: none;
}

.aw-product-crosslinks__more a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .aw-product-crosslinks__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .aw-compat-signs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .aw-compat-hero {
        padding: 20px 12px;
        gap: 12px;
    }

    .aw-compat-hero__symbol {
        font-size: 2.2em;
    }

    .aw-compat-crosslinks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .aw-compat-signs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

