/**
 * Bizlynet Master Plug Stylesheet
 * Version 2.3.2
 * Description: Trimmed for Kadence compatibility - focus on custom CPTs & URM tabs
 * Updated: Removed heavy BuddyPress overrides (use Kadence blocks/Query for directories)
 */

/* 1. Custom Directory Grid (CPTs) */
.bizlynet-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.bizlynet-directory-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bizlynet-directory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.bizlynet-directory-card img {
    border-radius: 50%;
    border: 4px solid #f0f0f0;
    width: 140px;          /* Force specific width */
    height: 140px;         /* Force specific height */
    object-fit: cover;     /* Crops the image into the square/circle without stretching */
    display: block;
    margin: 0 auto;
}

/* 2. Company Specific */
.company-card-image {
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 15px;
    border-radius: 8px;
}

.company-industry-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: #666;
    margin: 10px 0;
}

/* 3. Buttons - align with Kadence globals if possible */
.directory-primary-btn {
    display: inline-block;
    background: #5f6ecf;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    margin-top: 10px;
    cursor: pointer;
}

.directory-primary-btn:hover {
    background: #4a5ab8;
}

/* 4. URM Tab Content */
.urm-custom-tab-content {
    max-width: 800px;
    margin: 0 auto;
}

.urm-custom-tab-content h3 {
    margin: 20px 0 15px;
    color: #333;
}

/* Better: add .urm-form-section class in PHP instead of attribute selector */
.urm-form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* 5. Navigation Visibility */
body:not(.logged-in) [data-section="kadence_customizer_secondary_navigation"],
body:not(.logged-in) #secondary-navigation {
    display: none;
}

/* 6. Archive / Misc */
.bizlynet-directory-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.bizlynet-pagination {
    margin-top: 40px;
    text-align: center;
}

.bizlynet-pagination .page-numbers {
    padding: 8px 16px;
    border: 1px solid #ddd;
    margin: 0 4px;
    text-decoration: none;
    border-radius: 4px;
}

/* Responsive - only custom tweaks */
@media (max-width: 768px) {
    .bizlynet-directory-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
}

/* 7. Relationship Buttons (LinkedIn Style) */
.bizlynet-rel-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

/* Base style for both relationship buttons */
.btn-follow, .btn-connect {
    font-size: 14px !important;
    padding: 6px 16px !important;
    border-radius: 20px !important; /* LinkedIn uses pill-shaped buttons */
    font-weight: 600 !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    text-decoration: none !important;
}

/* Follow Button: Hollow Style */
.btn-follow {
    background-color: #ffffff !important;
    color: #0a66c2 !important;
    border: 1px solid #0a66c2 !important;
}

.btn-follow:hover {
    background-color: #eef3f8 !important;
    box-shadow: inset 0 0 0 1px #0a66c2 !important;
}

/* Connect Button: Solid Style */
.btn-connect {
    background-color: #0a66c2 !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
}

.btn-connect:hover {
    background-color: #004182 !important;
}

/* Active/Success State (Following/Sent) */
.btn-follow.active-rel, 
.btn-connect.active-rel {
    background-color: #ffffff !important;
    color: rgba(0, 0, 0, 0.6) !important; /* Subdued text */
    border: 1px solid rgba(0, 0, 0, 0.6) !important;
    pointer-events: none; /* Disables clicking once active */
}

/* Success Checkmark Logic */
.btn-follow.active-rel::before,
.btn-connect.active-rel::before {
    content: '✓';
    margin-right: 5px;
    font-weight: bold;
}

/* Specific color for Following success */
.btn-follow.active-rel {
    color: #057642 !important;
    border-color: #057642 !important;
    background-color: #f3f9f6 !important;
}

.urm-custom-tab-content table th {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
}
.urm-custom-tab-content table tr:hover {
    background-color: #fafafa;
}

/* Social Action Buttons */
.bizlynet-soc-btn {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.bizlynet-soc-btn:hover {
    background: #eee;
}

.bizlynet-soc-btn[data-action="follow"] {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

.bizlynet-soc-btn[data-action="accept_connect"] {
    background: #2ecc71;
    color: #fff;
    border-color: #27ae60;
}

.bizlynet-soc-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

/* Initial state: Hide them until JS decides otherwise */
.new-co-group, .join-co-group {
    display: none;
}