/**
 * MortgageLab.ai Dark Theme for AI Tools Directory - ACCORDION LAYOUT
 * Brand Colors: #A779E6 (primary purple), #00d5ff (accent cyan)
 * Font: Poppins
 * Version: 2.3.0 - 3px radius, improved filter menu
 */

/* ===========================================
   [C01] BASE THEME CONTAINER
   ============================================ */

.amt-directory {
    background: #0a0b10 !important;
    color: #e8e9f5 !important;
    font-family: 'Poppins', sans-serif !important;
    padding: 40px 20px !important;
    border-radius: 3px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Gradient glow background */
.amt-directory::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(circle at top center, rgba(167, 121, 230, 0.25), transparent 65%) !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

/* Content wrapper so text doesn't sit on the edges */
.amt-directory > * {
    position: relative !important;
    z-index: 1 !important;
}

/* ===========================================
   [C02] FILTER MENU - Premium Tab Bar
   ============================================ */

.amt-directory-filters {
    max-width: 1000px !important;
    margin: 0 auto 28px !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    justify-content: center !important;
    border-radius: 3px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative !important;
}

/* Subtle bottom border line */
.amt-directory-filters::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, #3a3a46 20%, #3a3a46 80%, transparent) !important;
}

.amt-filter-button {
    background: transparent !important;
    color: #8b8fa8 !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 12px 20px !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    white-space: nowrap !important;
    position: relative !important;
    margin-bottom: -1px !important;
}

.amt-filter-button:hover {
    color: #e8e9f5 !important;
    background: rgba(167, 121, 230, 0.08) !important;
}

.amt-filter-button.active {
    color: #A779E6 !important;
    border-bottom-color: #A779E6 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Glow effect under active tab */
.amt-filter-button.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 20% !important;
    right: 20% !important;
    height: 8px !important;
    background: #A779E6 !important;
    filter: blur(8px) !important;
    opacity: 0.6 !important;
    border-radius: 3px !important;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .amt-directory-filters {
        justify-content: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 1px !important;
    }
    
    .amt-directory-filters::-webkit-scrollbar {
        display: none !important;
    }

    .amt-filter-button {
        padding: 10px 16px !important;
        font-size: 13px !important;
        flex-shrink: 0 !important;
    }
}

/* ===========================================
   [C03] DIRECTORY CONTAINER & LIST (Accordion)
   ============================================ */

.amt-directory-list {
    max-width: 1000px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

/* ===========================================
   [C04] TOOL ROW - Accordion Item
   ============================================ */

.amt-tool-row {
    background: #0e0f14 !important;
    border: 1px solid #3a3a46 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    transition: all 0.25s ease !important;
    position: relative !important;
}

/* Featured tool highlight */
.amt-tool-row.amt-row-featured {
    border-color: #A779E6 !important;
    box-shadow: 0 0 0 1px rgba(167, 121, 230, 0.5), 0 12px 30px rgba(0, 0, 0, 0.6) !important;
}

/* Active row (expanded) */
.amt-tool-row.active {
    border-color: #00d5ff !important;
    box-shadow: 0 0 0 1px rgba(0, 213, 255, 0.5), 0 14px 35px rgba(0, 0, 0, 0.7) !important;
}

/* ===========================================
   [C05] ROW HEADER - Clickable accordion trigger
   ============================================ */

.amt-row-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    cursor: pointer !important;
    background: linear-gradient(90deg, rgba(20,21,30,0.95), rgba(12,13,20,0.98)) !important;
    transition: background 0.2s ease !important;
}

.amt-row-header:hover {
    background: linear-gradient(90deg, rgba(28,29,42,0.95), rgba(18,19,28,0.98)) !important;
}

/* Left side: Logo + Info */
.amt-header-main {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Logo container */
.amt-row-logo {
    width: 44px !important;
    height: 44px !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border: 1px solid #2a2b3d !important;
	padding: 3px;
}

.amt-row-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Info container (title + category) */
.amt-header-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

/* Tool title */
.amt-row-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #f5f4ff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Featured star */
.amt-star {
    font-size: 14px !important;
    line-height: 1 !important;
}

/* Category label under title */
.amt-row-category {
    font-size: 12px !important;
    color: #9d8fce !important;
    font-weight: 400 !important;
}

/* ===========================================
   [C06] HEADER META - Right side (price + chevron)
   ============================================ */

.amt-header-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}

/* Pricing tag */
.amt-meta-tag {
    padding: 6px 14px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    background: rgba(0, 213, 255, 0.15) !important;
    border: 1px solid rgba(0, 213, 255, 0.4) !important;
    color: #8de9ff !important;
    white-space: nowrap !important;
    min-width: 110px !important;
    text-align: center !important;
}

/* Toggle icon (chevron) */
.amt-toggle-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 3px !important;
    background: rgba(167, 121, 230, 0.15) !important;
    color: #A779E6 !important;
    transition: all 0.25s ease !important;
}

.amt-toggle-icon svg {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.25s ease !important;
}

/* Rotate chevron when expanded */
.amt-tool-row.active .amt-toggle-icon svg {
    transform: rotate(180deg) !important;
}

.amt-tool-row.active .amt-toggle-icon {
    background: #A779E6 !important;
    color: #0a0b10 !important;
}

/* ===========================================
   [C07] ROW BODY - Accordion content
   ============================================ */

.amt-row-body {
    display: none;
    padding: 0 20px 20px !important;
    background: radial-gradient(circle at top left, rgba(167, 121, 230, 0.1), transparent 50%) !important;
}

.amt-body-inner {
    padding-top: 16px !important;
    border-top: 1px solid #2a2b3d !important;
}

/* Grid wrapper */
.amt-body-grid {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr !important;
    gap: 24px !important;
}

/* ===========================================
   [C08] BODY MAIN - Description & CTA
   ============================================ */

.amt-body-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.amt-tool-description {
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #c8cae0 !important;
}

.amt-tool-description p {
    margin: 0 0 10px !important;
}

.amt-tool-description p:last-child {
    margin-bottom: 0 !important;
}

/* CTA area */
.amt-tool-actions {
    margin-top: auto !important;
}

/* Main CTA button */
.amt-cta-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 3px !important;
    background: linear-gradient(90deg, #A779E6, #00d5ff) !important;
    color: #0a0b10 !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}

.amt-cta-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6) !important;
    filter: brightness(1.08) !important;
    color: #0a0b10 !important;
    text-decoration: none !important;
}

/* ===========================================
   [C09] BODY DETAILS - Member content panel
   ============================================ */

.amt-body-details {
    background: linear-gradient(135deg, rgba(18, 19, 30, 0.96), rgba(10, 11, 18, 0.98)) !important;
    border-radius: 3px !important;
    border: 1px solid #303245 !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

/* Detail block */
.amt-detail-block {
    font-size: 13px !important;
    color: #d1d3e6 !important;
}

.amt-detail-block strong {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    color: #f0ecff !important;
}

/* Smaller text within details */
.amt-sm-text {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #b0b4d0 !important;
}

.amt-sm-text p {
    margin: 0 !important;
}

/* Links area */
.amt-detail-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 4px !important;
}

.amt-detail-links a {
    font-size: 12px !important;
    color: #8de9ff !important;
    text-decoration: none !important;
    padding: 6px 12px !important;
    border-radius: 3px !important;
    background: rgba(0, 80, 110, 0.5) !important;
    border: 1px solid rgba(0, 213, 255, 0.35) !important;
    transition: all 0.2s ease !important;
}

.amt-detail-links a:hover {
    background: rgba(0, 120, 160, 0.6) !important;
    border-color: rgba(0, 213, 255, 0.6) !important;
    color: #fff !important;
}

/* ===========================================
   [C10] LOCKED CONTENT - Non-member message
   ============================================ */

.amt-locked-row-msg {
    text-align: center !important;
    padding: 20px 16px !important;
    background: rgba(15, 16, 22, 0.96) !important;
    border-radius: 3px !important;
    border: 1px dashed rgba(167, 121, 230, 0.4) !important;
}

.amt-locked-row-msg .lock-icon {
    font-size: 24px !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.amt-locked-row-msg p {
    margin: 0 0 12px !important;
    font-size: 13px !important;
    color: #b0b4d0 !important;
    line-height: 1.5 !important;
}

.amt-locked-row-msg p strong {
    display: block !important;
    font-size: 14px !important;
    color: #f0ecff !important;
    margin-bottom: 4px !important;
}

/* Unlock link */
.amt-text-link {
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #A779E6 !important;
    text-decoration: none !important;
    padding: 8px 18px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(167, 121, 230, 0.5) !important;
    background: rgba(167, 121, 230, 0.1) !important;
    transition: all 0.2s ease !important;
}

.amt-text-link:hover {
    background: rgba(167, 121, 230, 0.25) !important;
    border-color: #A779E6 !important;
    color: #d3bef8 !important;
}

/* ===========================================
   [C11] RESPONSIVENESS
   ============================================ */

@media (max-width: 900px) {
    .amt-body-grid {
        grid-template-columns: 1fr !important;
    }

    .amt-body-details {
        order: -1 !important;
    }
}

@media (max-width: 700px) {
    .amt-row-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .amt-header-meta {
        align-self: stretch !important;
        justify-content: space-between !important;
    }

    .amt-row-title {
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    .amt-directory {
        padding: 24px 14px !important;
    }

    .amt-row-header {
        padding: 14px 14px !important;
    }

    .amt-row-body {
        padding: 0 14px 16px !important;
    }

    .amt-body-grid {
        gap: 16px !important;
    }

    .amt-cta-button {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ===========================================
   [C12] LOADER & EMPTY STATE
   ============================================ */

.amt-loader {
    text-align: center !important;
    padding: 30px 0 !important;
    color: #b8bbd9 !important;
    font-size: 14px !important;
}

.amt-empty-state {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #9da2c4 !important;
    font-size: 14px !important;
}

/* ===========================================
   [C13] UTILITY CLASSES
   ============================================ */

/* Generic pill (if needed) */
.amt-pill {
    padding: 3px 10px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    border: 1px solid #2f3142 !important;
    background: rgba(17, 18, 25, 0.95) !important;
}

.amt-pill.amt-category {
    border-color: rgba(167, 121, 230, 0.5) !important;
    color: #d3bef8 !important;
}

.amt-pill.amt-pricing {
    border-color: rgba(0, 213, 255, 0.45) !important;
    color: #aeeeff !important;
}

.amt-pill.amt-featured {
    border-color: rgba(255, 199, 72, 0.6) !important;
    color: #ffe19b !important;
}
