/**
 * Premium Frontend Directory Stylesheet
 * Marco Island Members Directory Plugin
 */

:root {
    --marco-fe-primary: #0284c7;
    --marco-fe-primary-hover: #0369a1;
    --marco-fe-accent: #d97706; /* Elegant Golden/Amber for Links */
    --marco-fe-accent-hover: #b45309;
    --marco-fe-text: #334155;
    --marco-fe-heading: #0f172a;
    --marco-fe-border: #e2e8f0;
    --marco-fe-bg-alt: #f8fafc;
    --marco-fe-badge-bg: #f1f5f9;
    --marco-fe-badge-text: #475569;
    --marco-fe-radius: 8px;
    --marco-fe-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --marco-fe-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

.marco-frontend-directory-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--marco-fe-text);
    line-height: 1.5;
}
.marco-frontend-directory-container * {
    box-sizing: border-box;
}

/* Filter and Search Bar */
.marco-directory-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--marco-fe-radius);
    border: 1px solid var(--marco-fe-border);
    box-shadow: var(--marco-fe-shadow);
}

.marco-directory-filter-bar .filter-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marco-directory-filter-bar .filter-col label {
    font-weight: 600;
    font-size: 13px;
    color: var(--marco-fe-heading);
}

.marco-directory-filter-bar select,
.marco-directory-filter-bar input[type="search"] {
    height: 38px;
    border: 1px solid var(--marco-fe-border);
    border-radius: 6px;
    padding: 0 12px;
    font-size: 13px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.marco-directory-filter-bar select:focus,
.marco-directory-filter-bar input[type="search"]:focus {
    border-color: var(--marco-fe-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.marco-directory-filter-bar .search-filter input[type="search"] {
    width: 200px;
}

.marco-directory-filter-bar .limit-selector select {
    padding-right: 24px;
}

/* Directory Table container */
.marco-directory-table-wrapper {
    position: relative;
    background: #fff;
    border: 1px solid var(--marco-fe-border);
    border-radius: var(--marco-fe-radius);
    box-shadow: var(--marco-fe-shadow);
    overflow-x: auto;
}

/* Loader Styles */
.marco-directory-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(1px);
}

.spinner-circle-small {
    width: 32px;
    height: 32px;
    border: 3px solid var(--marco-fe-border);
    border-top-color: var(--marco-fe-primary);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Table styling */
.marco-directory-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 13.5px;
    text-align: left;
}

.marco-directory-table th {
    background-color: #7dd3fc; /* Premium light blue header */
    color: #0369a1;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 2px solid #bae6fd;
    white-space: nowrap;
}

.marco-directory-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--marco-fe-border);
    vertical-align: middle;
}

.marco-directory-table tbody tr.directory-row:nth-child(4n+1) td {
    background-color: #fff;
}

.marco-directory-table tbody tr.directory-row:nth-child(4n+3) td {
    background-color: var(--marco-fe-bg-alt);
}

.marco-directory-table tbody tr.directory-row:hover td {
    background-color: rgba(2, 132, 199, 0.04);
}

/* Column configurations */
.col-expand { width: 40px; display: none; text-align: center; }
.col-logo { width: 70px; text-align: center; }
.col-company { font-weight: 600; }
.col-website { word-break: break-all; }
.col-cats { min-width: 120px; }
.col-action { text-align: center; width: 80px; }

/* Custom elements styling */
.directory-member-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--marco-fe-border);
    padding: 2px;
}

.directory-logo-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: #f1f5f9;
    border: 1px dashed var(--marco-fe-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--marco-fe-badge-text);
}

.directory-logo-placeholder .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.directory-permalink-link {
    color: var(--marco-fe-heading);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.directory-permalink-link:hover {
    color: var(--marco-fe-primary);
}

.directory-website-link {
    color: var(--marco-fe-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.directory-website-link:hover {
    color: var(--marco-fe-accent-hover);
    text-decoration: underline;
}

.directory-phone-link {
    color: var(--marco-fe-text);
    text-decoration: none;
}

.directory-phone-link:hover {
    text-decoration: underline;
    color: var(--marco-fe-primary);
}

.directory-cat-badge {
    display: inline-block;
    background: var(--marco-fe-badge-bg);
    color: var(--marco-fe-badge-text);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.directory-view-btn {
    display: inline-block;
    color: var(--marco-fe-accent);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.directory-view-btn:hover {
    color: var(--marco-fe-accent-hover);
    text-decoration: underline;
}

.no-records-found {
    text-align: center;
    color: var(--marco-fe-badge-text);
    padding: 30px !important;
    font-style: italic;
}

/* Pagination Bar styling */
.marco-directory-pagination-bar {
    margin-top: 15px;
    background: #fff;
    padding: 12px 20px;
    border-radius: var(--marco-fe-radius);
    border: 1px solid var(--marco-fe-border);
    box-shadow: var(--marco-fe-shadow);
}

.directory-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--marco-fe-badge-text);
}

.directory-pagination .pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pager-btn {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--marco-fe-border);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--marco-fe-text);
}

.pager-btn:hover:not(.disabled):not(:disabled) {
    background: var(--marco-fe-bg-alt);
    border-color: #cbd5e1;
    color: var(--marco-fe-heading);
}

.pager-btn.active {
    background-color: var(--marco-fe-primary);
    border-color: var(--marco-fe-primary);
    color: #fff;
    font-weight: 600;
}

.pager-btn.disabled,
.pager-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pager-ellipsis {
    padding: 0 4px;
    color: var(--marco-fe-badge-text);
}

/* Responsive Styles and Expand Drawer Row */
.expand-row-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #22c55e;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
    outline: none;
}

.directory-row.row-expanded .expand-row-btn {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: rotate(45deg);
}

.directory-detail-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--marco-fe-border) !important;
}

.expanded-member-details {
    background: #fafafb;
    border-top: 1px inset var(--marco-fe-border);
    border-bottom: 1px inset var(--marco-fe-border);
    padding: 16px 24px;
}

.expanded-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
}

.expanded-detail-grid .detail-item {
    color: var(--marco-fe-text);
}

.expanded-detail-grid .detail-item strong {
    color: var(--marco-fe-heading);
    margin-right: 4px;
}

.expanded-detail-grid .link-item {
    grid-column: span 2;
    margin-top: 6px;
}

/* Tablet & Mobile Breakpoints */
@media screen and (max-width: 1024px) {
    .marco-directory-table th.col-fname,
    .marco-directory-table td.col-fname,
    .marco-directory-table th.col-mname,
    .marco-directory-table td.col-mname,
    .marco-directory-table th.col-lname,
    .marco-directory-table td.col-lname,
    .marco-directory-table th.col-address,
    .marco-directory-table td.col-address {
        display: none;
    }
    
    .marco-directory-table th.col-expand,
    .marco-directory-table td.col-expand {
        display: table-cell;
    }
}

@media screen and (max-width: 768px) {
    .marco-directory-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .marco-directory-filter-bar .filter-col {
        justify-content: space-between;
    }
    
    .marco-directory-filter-bar .search-filter input[type="search"] {
        width: 100%;
        max-width: 250px;
    }

    .marco-directory-table th.col-phone,
    .marco-directory-table td.col-phone,
    .marco-directory-table th.col-cats,
    .marco-directory-table td.col-cats {
        display: none;
    }

    .expanded-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .expanded-detail-grid .link-item {
        grid-column: span 1;
    }
}

/* ==========================================================================
   Single Member Profile Template Styles
   ========================================================================== */

.marco-single-member-wrapper {
    background-color: var(--marco-fe-bg-alt);
    padding: 40px 0;
    min-height: 500px;
}

.marco-single-member-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Breadcrumb navigation link */
.marco-profile-breadcrumb {
    margin-bottom: 25px;
}

.marco-profile-breadcrumb .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--marco-fe-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.marco-profile-breadcrumb .back-link:hover {
    color: var(--marco-fe-accent-hover);
    transform: translateX(-2px);
}

/* Page Layout grid */
.marco-profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar Info Card */
.marco-profile-sidebar {
    position: sticky;
    top: 40px;
}

.marco-profile-card {
    background: #fff;
    border: 1px solid var(--marco-fe-border);
    border-radius: var(--marco-fe-radius);
    padding: 30px;
    box-shadow: var(--marco-fe-shadow);
    margin-bottom: 30px;
}

.marco-profile-card:last-child {
    margin-bottom: 0;
}

.company-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-logo-box {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 1px solid var(--marco-fe-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.profile-logo-box .profile-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.profile-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--marco-fe-badge-text);
}

.profile-company-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: var(--marco-fe-heading);
}

.profile-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.profile-cat-badge {
    background-color: var(--marco-fe-badge-bg);
    color: var(--marco-fe-badge-text);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
}

.profile-website-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--marco-fe-primary);
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.profile-website-btn:hover {
    background-color: var(--marco-fe-primary-hover);
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

/* Details list and rows */
.marco-profile-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.details-card .card-title,
.content-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--marco-fe-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--marco-fe-bg-alt);
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.detail-icon {
    width: 38px;
    height: 38px;
    background-color: rgba(2, 132, 199, 0.07);
    color: var(--marco-fe-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-content {
    flex-grow: 1;
}

.detail-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--marco-fe-badge-text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}

.detail-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--marco-fe-heading);
}

.detail-phone-link {
    color: var(--marco-fe-heading);
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-phone-link:hover {
    color: var(--marco-fe-primary);
    text-decoration: underline;
}

.detail-map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--marco-fe-accent);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 6px;
    transition: all 0.2s ease;
}

.detail-map-link:hover {
    color: var(--marco-fe-accent-hover);
    text-decoration: underline;
}

/* About Section Post Content */
.profile-about-content {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--marco-fe-text);
}

.profile-about-content p {
    margin-bottom: 15px;
}

.profile-about-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Overrides */
@media screen and (max-width: 768px) {
    .marco-profile-grid {
        grid-template-columns: 1fr;
    }
    
    .marco-profile-sidebar {
        position: static;
    }
    
    .profile-logo-box {
        width: 120px;
        height: 120px;
    }
    
    .marco-profile-card {
        padding: 20px;
    }
}

