/* monthly-portfolio.css - Revised with historical links section */

/* Monthly Portfolio Section - BEYAZ ARKA PLAN */
.monthly-portfolio-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    height: 100%;
}

/* Portfolio Header - Title ve Badge Yan Yana */
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    gap: 1rem;
}

.portfolio-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.portfolio-icon {
    width: 20px;
    height: 20px;
    color: #10b981;
    flex-shrink: 0;
}

.portfolio-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
}

/* Portfolio Content */
.portfolio-content {
    position: relative;
}

.portfolio-month-display {
    margin-bottom: 0;
    display: inline-block;
}

.current-month-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

/* Portfolio Stocks Grid - Kompakt Tek Satır */
.portfolio-stocks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    margin-top: 1rem;
}

.portfolio-stock-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.portfolio-stock-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #10b981, #059669);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.portfolio-stock-item:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
    background: #f0fdf4;
}

.portfolio-stock-item:hover::before {
    opacity: 1;
}

.stock-ticker {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Courier New', monospace;
    margin: 0;
    white-space: nowrap;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.stock-name {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #10b981;
    background: #f0fdf4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Historical Portfolios Section */
.historical-portfolios-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px solid #e5e7eb;
}

.historical-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.875rem;
}

.history-icon {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

/* Historical Links Grid - Beyaz Tema */
.historical-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.historical-portfolio-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.historical-portfolio-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.historical-portfolio-link:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    transform: translateX(3px);
    background: #eff6ff;
}

.historical-portfolio-link:hover::before {
    opacity: 1;
}

.link-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    flex-shrink: 0;
}

.historical-portfolio-link:hover .link-icon {
    color: #3b82f6;
}

.historical-portfolio-link span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.external-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.historical-portfolio-link:hover .external-icon {
    color: #3b82f6;
    transform: translate(2px, -2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-stock-item {
    animation: fadeInUp 0.4s ease-out forwards;
}

.historical-portfolio-link {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Stagger animation for historical links */
.historical-portfolio-link:nth-child(1) { animation-delay: 0.05s; }
.historical-portfolio-link:nth-child(2) { animation-delay: 0.1s; }
.historical-portfolio-link:nth-child(3) { animation-delay: 0.15s; }
.historical-portfolio-link:nth-child(4) { animation-delay: 0.2s; }
.historical-portfolio-link:nth-child(5) { animation-delay: 0.25s; }
.historical-portfolio-link:nth-child(6) { animation-delay: 0.3s; }

/* Responsive Design */
@media (max-width: 1024px) {
    .portfolio-stocks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .historical-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .monthly-portfolio-section {
        padding: 1rem;
        margin: 0;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .portfolio-title {
        font-size: 1rem;
    }

    .portfolio-stocks-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .portfolio-stock-item {
        padding: 0.625rem 0.75rem;
    }

    .stock-ticker {
        font-size: 0.8125rem;
    }

    .current-month-badge {
        font-size: 0.8125rem;
        padding: 0.35rem 1rem;
    }

    .historical-portfolios-section {
        margin-top: 1.25rem;
        padding-top: 1rem;
    }

    .historical-title {
        font-size: 0.9375rem;
    }

    .historical-links-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .historical-portfolio-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .portfolio-icon {
        width: 18px;
        height: 18px;
    }

    .portfolio-title {
        font-size: 0.9375rem;
    }

    .history-icon {
        width: 16px;
        height: 16px;
    }

    .historical-title {
        font-size: 0.875rem;
    }
}