/**
 * Stylesheet: Shared Reusable UI Components
 *
 * @package    Gigsdock_Customizations
 * @subpackage Assets_CSS
 * @since      1.0.0
 *
 * ============================================================================
 * Table of Contents:
 * 1. New Design System: Cards (.gd-card)
 * 2. New Design System: Buttons (.gd-btn)
 * 3. New Design System: Badges (.gd-badge)
 * 4. New Design System: Grids (.gd-grid-*)
 * 5. Legacy: Info Cards (.info-card)
 * 6. Legacy: Meta Badges (.meta-badge)
 * 7. Legacy: Pill Tags (.gigsdock-pill-tag, ul.company-taxonomy-list)
 * 8. Legacy: Buttons (.btn-primary, .btn-secondary, .btn-whatsapp, .btn-channel)
 * 9. Legacy: Homepage Buttons (.home-btn)
 * 10. Legacy: Homepage Filter Tags (.home-filter-tag)
 * 11. Legacy: Compact Related Job Card (.related-job-card)
 * 12. Legacy: Related Section Headers & Footers
 * ============================================================================
 */

/* ==========================================================================
   1. NEW: CARDS (.gd-card)
   ========================================================================== */

.gd-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
}

.gd-card.compact {
    padding: 20px;
    border-radius: 8px;
}

.gd-card.interactive {
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.gd-card.interactive:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gd-card.hover-subtle {
    background: #f8fafc;
    transition: background 0.2s ease;
}

.gd-card.hover-subtle:hover {
    background: #f1f5f9;
}

.gd-card.important-info-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
}

.gd-card.pro-tip-box {
    border-left: 4px solid #475569;
}

/* ==========================================================================
   2. NEW: BUTTONS (.gd-btn)
   ========================================================================== */

.gd-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    border: none;
    gap: 8px;
}

.gd-btn-primary {
    background: #2563eb;
    color: #ffffff !important;
}

.gd-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.gd-btn-secondary {
    background: #ffffff;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}

.gd-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.gd-btn-channel {
    color: #ffffff !important;
    padding: 12px;
    flex: 1;
}

.gd-btn-channel:hover {
    opacity: 0.9;
}

.gd-btn-whatsapp-channel {
    background: #22c55e;
}

.gd-btn-linkedin-channel {
    background: #0a66c2;
}

/* ==========================================================================
   3. NEW: BADGES (.gd-badge)
   ========================================================================== */

.gd-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 14px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, border-color 0.2s ease;
    box-shadow: none !important;
}

.gd-badge.pill {
    border-radius: 50px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
}

a.gd-badge:hover,
.gd-badge.interactive:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

.gd-badge.active,
input[type="radio"]:checked+.gd-badge.interactive {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}

.gd-badge.deadline-badge {
    color: #b91c1c !important;
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

/* ==========================================================================
   4. NEW: GRIDS (.gd-grid-*)
   ========================================================================== */

.gd-grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.gd-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {

    .gd-grid-2-col,
    .gd-grid-cards {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5. LEGACY: INFO CARDS (.info-card)
   ========================================================================== */

.info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 28px;
}

/* ==========================================================================
   6. LEGACY: META BADGES (.meta-badge)
   ========================================================================== */

.meta-badge {
    display: inline-flex;
    align-items: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #475569;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.meta-badge:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.meta-badge a {
    color: inherit;
    text-decoration: none;
}

.deadline-badge {
    color: #b91c1c !important;
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

/* ==========================================================================
   7. LEGACY: PILL TAGS (.gigsdock-pill-tag, ul.company-taxonomy-list)
   ========================================================================== */

.tech-stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

ul.company-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style-type: none;
    padding: 0;
    margin-top: 12px;
    font-family: 'Inter', -apple-system, sans-serif;
}

ul.company-taxonomy-list li a,
.gigsdock-pill-tag {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: background 0.2s ease, border-color 0.2s ease;
    box-shadow: none !important;
}

ul.company-taxonomy-list li a:hover,
.gigsdock-pill-tag:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    text-decoration: none !important;
}

ul.company-taxonomy-list .company-count,
ul.company-taxonomy-list .taxonomy-count {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* ==========================================================================
   8. LEGACY: BUTTONS (.btn-primary, .btn-secondary, .btn-whatsapp, .btn-channel)
   ========================================================================== */

.btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-channel {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s ease;
    cursor: pointer;
    border: none;
    color: #ffffff !important;
}

.btn-channel:hover {
    opacity: 0.9;
}

.btn-whatsapp-channel {
    background: #22c55e;
}

.btn-linkedin-channel {
    background: #0a66c2;
}

.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

@media (min-width: 640px) {
    .action-buttons-group {
        flex-direction: row;
    }
}

.btn-primary {
    background: #2563eb;
    color: #ffffff !important;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    flex: 1;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-secondary {
    background: #ffffff;
    color: #475569 !important;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-whatsapp {
    background: #ffffff;
    color: #475569 !important;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.btn-whatsapp:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ==========================================================================
   9. LEGACY: HOMEPAGE BUTTONS (.home-btn)
   ========================================================================== */

.home-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.home-btn-primary {
    background: #2563eb;
    color: #fff !important;
    border-color: #2563eb;
}

.home-btn-primary:hover {
    background: #1d4ed8;
    color: #fff !important;
}

.home-btn-secondary {
    background: #fff;
    color: #0f172a !important;
    border-color: #e2e8f0;
}

.home-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ==========================================================================
   10. LEGACY: HOMEPAGE FILTER TAGS (.home-filter-tag)
   ========================================================================== */

.home-filter-label {
    cursor: pointer;
    user-select: none;
}

.home-filter-label input[type="radio"] {
    display: none;
}

.home-filter-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.home-filter-label input[type="radio"]:checked+.home-filter-tag {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.home-filter-label:hover .home-filter-tag {
    background: #e2e8f0;
}

.home-filter-label input[type="radio"]:checked:hover+.home-filter-tag {
    background: #1d4ed8;
}

/* ==========================================================================
   11. LEGACY: COMPACT RELATED JOB CARD (.related-job-card)
   ========================================================================== */

.related-job-card {
    display: block;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none !important;
    background: #ffffff;
    transition: all 0.2s ease;
}

.related-job-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Keep legacy #f8fafc design when inside the sidebar */
.job-sidebar .related-job-card {
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: none;
}

.job-sidebar .related-job-card:hover {
    background: #f1f5f9;
    border: none;
    box-shadow: none;
}

/* Updates card */
.updates-card {
    background: #ffffff;
}

.updates-card h3 {
    font-size: 18px;
    color: #0f172a;
    margin: 0 0 12px 0;
}

/* ==========================================================================
   12. LEGACY: RELATED SECTION HEADERS & FOOTERS
   ========================================================================== */

.related-jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.related-jobs-header h2 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    font-size: 18px !important;
}

.related-jobs-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   13. LEGACY: CTA SECTION (.home-cta-section)
   ========================================================================== */

.home-cta-section {
    text-align: center;
    padding: 60px 20px;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    margin-bottom: 40px;
}

.home-cta-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
}

.home-cta-subtitle {
    font-size: 16px;
    color: #cbd5e1;
    margin: 0 auto 25px auto;
    max-width: 500px;
}

/* ==========================================================================
   14. STANDARDIZED UI COMPONENTS (Unified refactor)
   ========================================================================== */

/* Sidebar Widgets */
.sidebar-widget-header {
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-widget-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-widget-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.sidebar-widget-footer .view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

/* Common Components */
.badge-count {
    opacity: 0.6;
    margin-left: 4px;
}

.card-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Empty States (404, No Results) */
.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 15px 0;
}

.empty-state-desc {
    color: #475569;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Sidebar Search Form */
.sidebar-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Shared Input Base UI */
.gigsdock-input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gigsdock-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.sidebar-search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
}



.sidebar-search-button {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-search-button:hover {
    background: #1d4ed8;
}

/* Recent Articles Sidebar Widget */
.recent-article-card {
    display: block;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    background: #f8fafc;
    transition: background 0.2s ease;
}

.recent-article-card:hover {
    background: #f1f5f9;
}

.recent-article-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.recent-article-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* Social Footer Links */
.social-footer-link-wrapper {
    text-align: center;
    margin-bottom: 10px;
}

.social-footer-link {
    color: #475569;
    text-decoration: underline;
    font-size: 15px;
    font-weight: 500;
}

/* Job & Post Cards */
.job-card-title,
.post-card-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.post-card-excerpt {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    text-align: left;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: var(--max-lines, 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   13. LEGACY: CTA SECTION (.home-cta-section)
   ========================================================================== */

.home-cta-section {
    text-align: center;
    padding: 60px 20px;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    margin-bottom: 40px;
}

.home-cta-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
}

.home-cta-subtitle {
    font-size: 16px;
    color: #cbd5e1;
    margin: 0 auto 25px auto;
    max-width: 500px;
}

/* ==========================================================================
   14. STANDARDIZED UI COMPONENTS (Unified refactor)
   ========================================================================== */

/* Sidebar Widgets */
.sidebar-widget-header {
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-widget-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-widget-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.sidebar-widget-footer .view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

/* Common Components */
.badge-count {
    opacity: 0.6;
    margin-left: 4px;
}

.card-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Empty States (404, No Results) */
.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 15px 0;
}

.empty-state-desc {
    color: #475569;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Sidebar Search Form */
.sidebar-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #0f172a;
    transition: all 0.2s ease;
}

.sidebar-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidebar-search-button {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-search-button:hover {
    background: #1d4ed8;
}

/* Recent Articles Sidebar Widget */
.recent-article-card {
    display: block;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    background: #f8fafc;
    transition: background 0.2s ease;
}

.recent-article-card:hover {
    background: #f1f5f9;
}

.recent-article-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.recent-article-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* Social Footer Links */
.social-footer-link-wrapper {
    text-align: center;
    margin-bottom: 10px;
}

.social-footer-link {
    color: #475569;
    text-decoration: underline;
    font-size: 15px;
    font-weight: 500;
}

