/**
 * Limenco Freelance Cards - Styles
 */

/* Grid Layout */
.lfc-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.lfc-grid.lfc-columns-1 { grid-template-columns: 1fr; }
.lfc-grid.lfc-columns-2 { grid-template-columns: repeat(2, 1fr); }
.lfc-grid.lfc-columns-3 { grid-template-columns: repeat(3, 1fr); }
.lfc-grid.lfc-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Grid */
@media (max-width: 1200px) {
    .lfc-grid.lfc-columns-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .lfc-grid.lfc-columns-3,
    .lfc-grid.lfc-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .lfc-grid.lfc-columns-2,
    .lfc-grid.lfc-columns-3,
    .lfc-grid.lfc-columns-4 { grid-template-columns: 1fr; }
}

/* Card Styles */
.lfc-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.lfc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.lfc-card-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

/* Vertical Center Header */
.lfc-card-header.lfc-header-vertical-center {
    align-items: center;
}

.lfc-card-avatar {
    flex-shrink: 0;
}

.lfc-card-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f1;
}

.lfc-card-info {
    flex: 1;
    min-width: 0;
}

.lfc-card-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
}

.lfc-card-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

.lfc-card-location {
    margin: 0;
    font-size: 13px;
    color: #646970;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lfc-card-location .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Card Body */
.lfc-card-body {
    margin-bottom: 15px;
}

.lfc-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.lfc-skill-tag {
    background: #f0f6fc;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #c3e4f7;
}

.lfc-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 13px;
}

.lfc-card-experience {
    color: #646970;
}

.lfc-card-experience strong {
    color: #1e1e1e;
}

.lfc-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lfc-stars {
    display: flex;
    gap: 1px;
}

.lfc-star {
    font-size: 14px;
    line-height: 1;
}

.lfc-star.filled {
    color: #ffb900;
}

.lfc-star.empty {
    color: #dcdcde;
}

.lfc-rating-text {
    font-weight: 600;
    color: #1e1e1e;
}

.lfc-card-rate {
    color: #00a32a;
    font-weight: 600;
}

/* Card Footer */
.lfc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.lfc-card-availability {
    flex: 1;
}

.lfc-availability-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.lfc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lfc-availability-status.available {
    color: #00a32a;
}

.lfc-availability-status.available .lfc-status-dot {
    background: #00a32a;
}

.lfc-availability-status.unavailable {
    color: #d63638;
}

.lfc-availability-status.unavailable .lfc-status-dot {
    background: #d63638;
}

.lfc-card-button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lfc-card-button:hover {
    background: #005a87;
}

/* Filters */
.lfc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.lfc-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    flex: 1;
}

.lfc-filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e1e1e;
    font-size: 14px;
}

.lfc-filter {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #1e1e1e;
}

.lfc-filter:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

/* Checkbox Filters */
.lfc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lfc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.lfc-filter-checkbox {
    margin: 0;
}

/* Loading and No Results */
.lfc-loading {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.lfc-loading-message {
    font-size: 16px;
    color: #646970;
}

.lfc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
    grid-column: 1 / -1;
}

.lfc-no-results p {
    margin: 0;
    font-size: 16px;
}

/* Widget Specific Styles */
.lfc-widget {
    margin-bottom: 30px;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .lfc-filters {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .lfc-filter-group {
        min-width: auto;
        width: 100%;
    }

    .lfc-filter {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .lfc-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .lfc-card-button {
        align-self: stretch;
        text-align: center;
    }
}

/* Extra small screens - prevent overflow */
@media (max-width: 480px) {
    .lfc-filters {
        padding: 10px;
        gap: 10px;
        margin-bottom: 15px;
    }

    .lfc-filter-group {
        min-width: 0;
        width: 100%;
        flex: none;
    }

    .lfc-filter-group label {
        font-size: 13px;
    }

    .lfc-filter,
    .lfc-filter-group select,
    .lfc-filter-group input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
        font-size: 14px;
        padding: 8px 10px;
    }

    .lfc-checkbox-group {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* Animation for filtering */
.lfc-card-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lfc-wrapper.lfc-loading .lfc-card-wrapper {
    opacity: 0.5;
}

/* Accessibility */
.lfc-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.lfc-card-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Card Style Variations */

/* Compact Style */
.lfc-style-compact .lfc-card {
    padding: 15px;
}

.lfc-style-compact .lfc-card-header {
    margin-bottom: 10px;
}

.lfc-style-compact .lfc-card-avatar img {
    width: 50px;
    height: 50px;
}

.lfc-style-compact .lfc-card-name {
    font-size: 16px;
    margin-bottom: 3px;
}

.lfc-style-compact .lfc-card-title {
    font-size: 13px;
    margin-bottom: 5px;
}

.lfc-style-compact .lfc-card-body {
    margin-bottom: 10px;
}

.lfc-style-compact .lfc-skill-tag {
    padding: 2px 6px;
    font-size: 11px;
}

.lfc-style-compact .lfc-card-meta {
    font-size: 12px;
    gap: 10px;
}

/* Minimal Style */
.lfc-style-minimal .lfc-card {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 10px;
}

.lfc-style-minimal .lfc-card-header {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.lfc-style-minimal .lfc-card-footer {
    border-top: none;
    padding-top: 10px;
}

.lfc-style-minimal .lfc-card-button {
    background: transparent;
    color: #007cba;
    border: 1px solid #007cba;
    padding: 6px 12px;
}

.lfc-style-minimal .lfc-card-button:hover {
    background: #007cba;
    color: #fff;
}

/* Detailed Style */
.lfc-style-detailed .lfc-card {
    padding: 25px;
}

.lfc-style-detailed .lfc-card-header {
    margin-bottom: 20px;
}

.lfc-style-detailed .lfc-card-avatar img {
    width: 80px;
    height: 80px;
}

.lfc-style-detailed .lfc-card-name {
    font-size: 20px;
}

.lfc-style-detailed .lfc-card-title {
    font-size: 15px;
}

.lfc-style-detailed .lfc-card-body {
    margin-bottom: 20px;
}

.lfc-style-detailed .lfc-card-meta {
    gap: 20px;
    font-size: 14px;
}

.lfc-style-detailed .lfc-skill-tag {
    padding: 6px 10px;
    font-size: 13px;
}

/* Hide Elements Based on Settings */
.lfc-hide-avatar .lfc-card-avatar {
    display: none;
}

.lfc-hide-location .lfc-card-location {
    display: none;
}

.lfc-hide-skills .lfc-card-skills {
    display: none;
}

.lfc-hide-experience .lfc-card-experience {
    display: none;
}

.lfc-hide-rating .lfc-card-rating {
    display: none;
}

.lfc-hide-rate .lfc-card-rate {
    display: none;
}

.lfc-hide-availability .lfc-card-availability {
    display: none;
}

.lfc-hide-button .lfc-card-button {
    display: none;
}

/* Layout Presets */

/* Compact Header Layout */
.lfc-layout-compact-header .lfc-card-header {
    flex-wrap: wrap;
    align-items: center;
}

.lfc-layout-compact-header .lfc-card-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.lfc-layout-compact-header .lfc-card-name,
.lfc-layout-compact-header .lfc-card-title,
.lfc-layout-compact-header .lfc-card-location {
    margin: 0;
}

/* Skills in Header Layout */
.lfc-layout-skills-in-header .lfc-card-header {
    flex-direction: column;
    align-items: flex-start;
}

.lfc-layout-skills-in-header .lfc-card-skills {
    order: -1;
    margin-bottom: 10px;
    margin-top: 0;
}

.lfc-layout-skills-in-header .lfc-card-body .lfc-card-skills {
    display: none;
}

/* Vertical Centered Layout */
.lfc-layout-vertical-center .lfc-card {
    text-align: center;
}

.lfc-layout-vertical-center .lfc-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lfc-layout-vertical-center .lfc-card-avatar {
    margin-bottom: 10px;
}

.lfc-layout-vertical-center .lfc-card-meta {
    justify-content: center;
}

/* Side by Side Layout */
.lfc-layout-side-by-side .lfc-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "header meta"
        "body footer";
    gap: 15px;
}

.lfc-layout-side-by-side .lfc-card-header {
    grid-area: header;
}

.lfc-layout-side-by-side .lfc-card-body {
    grid-area: body;
}

.lfc-layout-side-by-side .lfc-card-meta {
    grid-area: meta;
    flex-direction: column;
    align-items: flex-start;
}

.lfc-layout-side-by-side .lfc-card-footer {
    grid-area: footer;
}

/* Minimal Header Layout */
.lfc-layout-minimal-header .lfc-card-header {
    margin-bottom: 5px;
}

.lfc-layout-minimal-header .lfc-card-location {
    display: none;
}

.lfc-layout-minimal-header .lfc-card-body {
    margin-top: 10px;
}

/* Responsive adjustments for layout presets */
@media (max-width: 768px) {
    .lfc-layout-side-by-side .lfc-card {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "meta"
            "body"
            "footer";
    }
    
    .lfc-layout-compact-header .lfc-card-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Inline Field Groups - HIGHEST PRIORITY */
.lfc-field-inline-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}

.lfc-field-inline-group > * {
    margin: 0 !important;
    flex: 0 1 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
}

/* Allow buttons to be full width even in inline groups if needed */
.lfc-field-inline-group > .lfc-card-button {
    flex: 1 1 auto !important;
    width: 100% !important;
    justify-content: center !important;
}

/* Header inline groups */
.lfc-card-header .lfc-field-inline-group {
    margin-bottom: 0 !important;
}

/* Footer inline groups */
.lfc-card-footer .lfc-field-inline-group {
    margin-bottom: 0 !important;
    width: 100% !important;
}

/* Add separator between inline fields (except buttons) */
.lfc-field-inline-group > *:not(:last-child):not(.lfc-card-button)::after {
    content: '•';
    margin-left: 8px;
    color: #9ca3af;
    font-weight: normal;
    font-size: 16px;
}

/* Specific field adjustments inside inline groups */
.lfc-field-inline-group .lfc-card-location,
.lfc-field-inline-group .lfc-card-experience,
.lfc-field-inline-group .lfc-card-rating,
.lfc-field-inline-group .lfc-card-rate,
.lfc-field-inline-group .lfc-card-availability {
    white-space: nowrap !important;
}

.lfc-field-inline-group .lfc-card-skills {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    margin-bottom: 0 !important;
}

/* Allow custom CSS to override inline group behavior */
.lfc-card-footer .lfc-field-inline-group .lfc-card-button {
    /* Custom CSS can override this */
}

.lfc-card-header .lfc-field-inline-group > * {
    /* Custom CSS can target header fields */
}

/* Responsive inline groups */
@media (max-width: 480px) {
    .lfc-field-inline-group {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .lfc-field-inline-group > * {
        width: 100% !important;
    }
    
    .lfc-field-inline-group > *:not(:last-child)::after {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .lfc-filters {
        display: none;
    }
    
    .lfc-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .lfc-card-button {
        display: none;
    }
}