/**
 * Ideas Vault - Frontend Styles
 * "Clean SaaS" Design
 */

/* Variables */
:root {
    --iv-primary: #3b82f6;
    /* Blue */
    --iv-secondary: #059669;
    /* Green for revenue */
    --iv-bg-light: #f9fafb;
    --iv-border: #e2e8f0;
    --iv-text: #0f172a;
    --iv-text-light: #64748b;
    --iv-locked: #94a3b8;
    --iv-radius: 8px;
    --iv-tag-bg: #f3f4f6;
    /* For tech tags */
}

/* Container */
.ideas-vault-container {
    font-family: inherit;
    direction: rtl;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    color: var(--iv-text);
}

/* Category Tabs (Top) */
/* Category Tabs (Top) */
.ideas-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--iv-border);
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--iv-border);
    background: white;
    color: var(--iv-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    border-color: var(--iv-primary);
    color: var(--iv-primary);
}

.tab-btn.active {
    background: var(--iv-primary);
    color: white;
    border-color: var(--iv-primary);
}

/* Filters */
.ideas-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.ideas-filters .filter-group {
    flex: 1;
    min-width: 180px;
}

.ideas-filters label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--iv-text);
    margin-bottom: 8px;
}

.ideas-filters select {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--iv-border);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    color: var(--iv-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    font-family: inherit;
}

/* Table */
.ideas-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--iv-radius);
    overflow: hidden;
    border: 1px solid var(--iv-border);
}

.ideas-table thead th {
    text-align: right;
    padding: 16px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--iv-text);
    background: white;
    border-bottom: 1px solid var(--iv-border);
}

.ideas-table tbody tr {
    border-bottom: 1px solid var(--iv-border);
    transition: background-color 0.1s;
}

.ideas-table tbody tr:hover {
    background-color: #f8fafc;
}

.ideas-table tbody tr:last-child {
    border-bottom: none;
}

.ideas-table td {
    padding: 16px 24px;
    vertical-align: middle;
}

/* Column: Toggle */
.toggle-btn {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--iv-primary);
    color: var(--iv-primary);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
    margin-left: 12px;
    text-decoration: none;
}

.toggle-btn:hover {
    background: var(--iv-primary);
    color: white;
}

/* Column: Project */
.col-project {
    width: 26%;
}

.project-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.project-icon-placeholder {
    width: 24px;
    height: 24px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.idea-title {
    font-weight: 600;
    color: var(--iv-text);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.idea-title:hover {
    text-decoration: underline;
}

.external-arrow {
    color: var(--iv-text-light);
    font-size: 12px;
    font-weight: normal;
}

.refresh-icon {
    margin-left: 8px;
    color: #8b5cf6;
    /* purple */
    font-size: 14px;
    cursor: help;
}

/* Column: Description (شرح المشروع) */
.col-description {
    width: 25%;
}

.col-description p {
    font-size: 14px;
    color: var(--iv-text-light);
    margin: 0;
    line-height: 1.5;
}

/* Column: Built With (الأدوات) */
.col-built-with {
    width: 12%;
}

.tech-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #fff0f0;
    /* Default light reddish like screenshot */
    border-radius: 4px;
    font-size: 12px;
    color: var(--iv-text);
    text-decoration: none;
    gap: 6px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.tech-tag:nth-child(2n) {
    background: #f0f9ff;
}

/* Light blue */
.tech-tag:nth-child(3n) {
    background: #f0fdf4;
}

/* Light green */

.tech-tag:hover {
    border-color: var(--iv-border);
}

.tech-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.tech-icon-fallback {
    font-size: 12px;
}

.tag-arrow {
    font-size: 10px;
    color: var(--iv-text-light);
    opacity: 0.5;
}

.no-tools {
    color: var(--iv-text-light);
    font-size: 13px;
}

/* Column: Revenue (الأرباح) */
.col-revenue {
    width: 8%;
    text-align: left;
    padding-left: 24px;
}

.revenue-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.revenue-amount {
    font-weight: 700;
    color: var(--iv-text);
    font-size: 14px;
}

.revenue-period {
    font-size: 11px;
    color: var(--iv-text-light);
    text-transform: lowercase;
}

/* Column: Strategy (الاستراتيجية) */
.col-strategy {
    width: 25%;
}

.col-strategy p {
    font-size: 14px;
    color: var(--iv-text-light);
    margin: 0;
    line-height: 1.5;
}

.no-strategy {
    color: var(--iv-text-light);
    font-size: 13px;
}

/* Locked States */
.idea-locked {
    background-color: transparent;
}

.idea-locked .idea-title {
    color: var(--iv-text-light);
}

.locked-icon-sm {
    font-size: 16px;
}

.blurred-text,
.blurred-tools {
    filter: blur(4px);
    opacity: 0.5;
    user-select: none;
}

/* Mobile View - Show table with horizontal scroll */
.mobile-view {
    display: none;
}

@media (max-width: 900px) {
    .ideas-vault-container {
        padding: 10px;
    }

    .ideas-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .desktop-view {
        display: table;
        min-width: 800px;
    }

    .mobile-view {
        display: none;
    }

    .ideas-filters {
        gap: 15px;
    }

    .ideas-filters .filter-group {
        min-width: 140px;
    }

    .ideas-table td,
    .ideas-table th {
        padding: 12px 16px;
        white-space: nowrap;
    }

    .col-description p,
    .col-strategy p {
        white-space: normal;
        min-width: 200px;
    }
}

/* Subscribe CTA */
.ideas-subscribe-cta {
    margin-top: 30px;
    text-align: center;
    padding: 40px;
    background: linear-gradient(to right, #f8fafc, #edf2f7);
    border-radius: 8px;
    border: 1px dashed var(--iv-border);
}

.subscribe-btn {
    display: inline-block;
    background: var(--iv-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
}

/* Pagination */
.ideas-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: var(--iv-radius);
    border: 1px solid var(--iv-border);
}

.pagination-info {
    color: var(--iv-text-light);
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--iv-border);
    border-radius: 6px;
    background: white;
    color: var(--iv-text);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--iv-primary);
    color: var(--iv-primary);
}

.page-btn.active {
    background: var(--iv-primary);
    border-color: var(--iv-primary);
    color: white;
}

.page-btn.prev,
.page-btn.next {
    padding: 0 16px;
    font-weight: 500;
}

.page-dots {
    color: var(--iv-text-light);
    padding: 0 4px;
}

@media (max-width: 600px) {
    .pagination-buttons {
        gap: 4px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }

    .page-btn.prev,
    .page-btn.next {
        padding: 0 10px;
    }
}