/**
 * AmCharts 5 Stock Chart Styles for ForTraders
 * Based on: https://www.amcharts.com/demos/stock-chart/
 * @version 2.2.0
 */

/* Chart controls container */
div[id$="-controls"] {
    height: auto;
    padding: 5px 5px 0 16px;
    max-width: 100%;
}

/* Chart container */
.tech_graph {
    width: 100%;
    height: 600px;
    max-width: 100%;
}

/* Responsive heights */
@media (max-width: 768px) {
    .tech_graph {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .tech_graph {
        height: 400px;
    }
}

/* Chart Action Buttons */
.chart-actions button {
    transition: all 0.3s ease;
}

.export-chart-btn:hover {
    background: #45a049 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.save-chart-btn:hover {
    background: #F57C00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.save-idea-btn:hover {
    background: #F57C00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.chart-actions button:active {
    transform: translateY(0);
}

/* Saved Charts List */
.saved-charts-manager {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saved-charts-list button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.saved-charts-list button:active {
    transform: translateY(0);
}

/* Trading Ideas Modal */
.idea-modal {
    animation: fadeIn 0.3s ease;
}

.idea-modal-content {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.idea-modal-close:hover,
.idea-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.save-idea-btn:hover {
    background: #F57C00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* Parent containers */
.quoteChartsWrap,
.trading-ideas-section {
    overflow: visible !important;
}

/* Trading Ideas Gallery - Static Grid */
.trading-ideas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 20px;
}

/* Trading Idea Card */
.trading-idea-card {
    position: relative;
    width: 100%;
    height: 200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trading-idea-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

/* Chart Image */
.idea-card-image {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

.idea-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transform-origin: right center;
    transition: transform 8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Cinematic Zoom on Hover */
.trading-idea-card:hover .idea-card-image img {
    transform: scale(2.5);
    transition: transform 12s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Overlay with Info */
.idea-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 15px;
    color: white;
    transition: opacity 0.3s ease;
}

/* Delete button (admin only) */
.idea-delete-btn {
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.trading-idea-card:hover .idea-delete-btn {
    opacity: 1;
}

.idea-delete-btn:hover {
    background: rgba(211, 47, 47, 0.95) !important;
    transform: scale(1.05);
}

.idea-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.idea-card-user {
    display: flex;
    align-items: center;
    gap: 5px;
}

.idea-card-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFA726;
}

.idea-card-stats {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.idea-card-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Comment Preview */
.idea-card-comment {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.95);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Show All Ideas Button */
.show-all-ideas-btn:hover {
    background: #F57C00 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* Loading States */
.ideas-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trading-ideas-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .trading-idea-card {
        width: 280px !important;
        min-width: 280px !important;
        height: 158px;
    }
    
    .show-all-ideas-btn {
        font-size: 12px;
        padding: 8px 15px !important;
    }
}

