/**
 * Company Details page — profile card, info grid, registration table, legal strip.
 */

html.ha-unified .co-meta {
    margin-bottom: 28px;
}

html.ha-unified .company-details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.5vw, 20px);
    margin: 0 0 32px;
}

html.ha-unified .co-detail-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: clamp(18px, 3vw, 22px);
    border-radius: var(--border-radius, 12px);
    border: 1px solid rgba(0, 115, 5, 0.14);
    background: linear-gradient(160deg, #ffffff 0%, #f5faf6 100%);
    box-shadow: 0 6px 18px rgba(0, 75, 4, 0.05);
    transition:
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.24s ease,
        border-color 0.24s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .co-detail-card:hover,
html.ha-unified .co-detail-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(0, 115, 5, 0.28);
    box-shadow: 0 12px 28px rgba(0, 75, 4, 0.1);
}

html.ha-unified .co-detail-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 115, 5, 0.1);
    color: var(--primary-green, #007305);
    font-size: 1rem;
    flex-shrink: 0;
}

html.ha-unified .co-detail-card__label {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light, #525a54);
}

html.ha-unified .co-detail-card__value {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 0.98rem);
    line-height: 1.55;
    color: var(--dark-green, #004b04);
    font-weight: 600;
    word-break: break-word;
}

html.ha-unified .co-detail-card__value a {
    color: var(--primary-green, #007305) !important;
    text-decoration: none !important;
    font-weight: 600;
}

html.ha-unified .co-detail-card__value a:hover,
html.ha-unified .co-detail-card__value a:focus-visible {
    text-decoration: underline !important;
    outline: none;
}

html.ha-unified .co-detail-card__action {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 115, 5, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-green, #004b04) !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

html.ha-unified .co-detail-card__action:hover,
html.ha-unified .co-detail-card__action:focus-visible {
    background: #ecfdf5;
    transform: translateY(-1px);
    outline: none;
}

html.ha-unified .co-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--border-color, #e5ebe7);
}

html.ha-unified .co-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

html.ha-unified .co-section h3 {
    margin: 0 0 16px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.15rem, 2.5vw, 1.3rem);
    color: var(--dark-green, #004b04);
}

html.ha-unified .co-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

html.ha-unified .co-details-table th,
html.ha-unified .co-details-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--border-color, #e5ebe7);
}

html.ha-unified .co-details-table th {
    width: 34%;
    background: var(--bg-light, #f5faf6);
    color: var(--dark-green, #004b04);
    font-weight: 600;
    font-size: 0.86rem;
}

html.ha-unified .co-details-table td {
    color: var(--text-main, #1a1f1b);
    line-height: 1.55;
}

html.ha-unified .co-details-table tr:nth-child(even) td {
    background: rgba(245, 250, 246, 0.55);
}

html.ha-unified .co-legal-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
}

html.ha-unified .co-legal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 115, 5, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark-green, #004b04) !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none !important;
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

html.ha-unified .co-legal-link i {
    color: var(--primary-green, #007305);
    font-size: 0.82rem;
}

html.ha-unified .co-legal-link:hover,
html.ha-unified .co-legal-link:focus-visible {
    background: #ecfdf5;
    border-color: rgba(0, 115, 5, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 75, 4, 0.1);
    outline: none;
}

html.ha-unified .co-back-row {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e5ebe7);
}

html.ha-unified .co-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #007a05 0%, #004b04 100%);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(0, 75, 4, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

html.ha-unified .co-back-link:hover,
html.ha-unified .co-back-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 75, 4, 0.28);
    outline: none;
}

html.ha-unified .co-detail-card.is-pulse {
    animation: co-card-pulse 0.45s ease;
}

@keyframes co-card-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@media (max-width: 900px) {
    html.ha-unified .company-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html.ha-unified .company-details-grid {
        grid-template-columns: 1fr;
    }

    html.ha-unified .co-details-table th,
    html.ha-unified .co-details-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    html.ha-unified .co-details-table th {
        border-bottom: none;
        padding-bottom: 6px;
    }

    html.ha-unified .co-details-table td {
        padding-top: 0;
        margin-bottom: 8px;
    }

    html.ha-unified .co-details-table tr {
        display: block;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--border-color, #e5ebe7);
    }

    html.ha-unified .co-legal-strip {
        flex-direction: column;
    }

    html.ha-unified .co-legal-link {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    html.ha-unified .co-back-link {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
