/* Custom styles for Stock Chart Analyzer */

/* Pricing page enhancements */
.pricing-price {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pricing-card-title {
    font-weight: 600;
}

.card.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.card.shadow-sm {
    transition: all 0.3s ease;
}

.card.shadow-sm:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.text-success {
    color: #198754 !important;
}

/* Responsive adjustments for pricing cards */
@media (max-width: 992px) {
    .card.shadow-lg {
        transform: none;
    }
    
    .pricing-price .display-4 {
        font-size: 2.5rem;
    }
}

/* Loading animations */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Badge text wrapping for long content */
.badge.text-wrap {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    display: inline-block !important;
    line-height: 1.4 !important;
}

/* Investment recommendation container */
.recommendation-box {
    overflow: hidden;
    word-wrap: break-word;
}

.recommendation-box .badge {
    max-width: 90% !important;
    text-align: center !important;
}

.recommendation-box p.lead {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Investment Overview Table improvements */
.overview-table {
    table-layout: fixed;
    width: 100%;
}

.overview-table th,
.overview-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
    padding: 12px 8px;
}

.overview-table th:nth-child(1),
.overview-table td:nth-child(1) { width: 15%; } /* Symbol */
.overview-table th:nth-child(2),
.overview-table td:nth-child(2) { width: 18%; } /* Investment Type */
.overview-table th:nth-child(3),
.overview-table td:nth-child(3) { width: 35%; } /* Risk Level */
.overview-table th:nth-child(4),
.overview-table td:nth-child(4) { width: 20%; } /* Action */
.overview-table th:nth-child(5),
.overview-table td:nth-child(5) { width: 12%; } /* Price */

/* Badge sizing in table */
.overview-table .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.3;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .overview-table {
        font-size: 0.9rem;
    }
    
    .overview-table .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
}

/* Responsive text for mobile */
@media (max-width: 768px) {
    .recommendation-box .badge {
        font-size: 1rem !important;
        max-width: 95% !important;
        padding: 8px 12px !important;
    }
    
    .recommendation-box p.lead {
        font-size: 1.1rem !important;
    }
}

/* File upload area styling */
.form-control:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-info-rgb), 0.25);
}

/* Preview image styling */
#previewImage {
    border: 2px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

#previewImage:hover {
    border-color: var(--bs-info);
    transform: scale(1.02);
}

/* Card enhancements */
.card {
    border: 1px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--bs-info);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Badge styling for better visibility */
.badge {
    font-weight: 500;
}

.badge.fs-6 {
    font-size: 0.875rem !important;
}

.badge.fs-3 {
    font-size: 1.75rem !important;
}

/* Trend direction badges */
.badge.bg-success {
    background-color: var(--bs-success) !important;
}

.badge.bg-danger {
    background-color: var(--bs-danger) !important;
}

.badge.bg-warning {
    background-color: var(--bs-warning) !important;
    color: var(--bs-dark) !important;
}

/* List styling */
.list-group-item {
    background-color: transparent;
    border-color: var(--bs-border-color);
}

/* Button enhancements */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Analysis page specific styles */
.card-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    .badge {
        border: 1px solid #000;
        color: #000 !important;
        background-color: transparent !important;
    }
}

/* Loading state */
#loadingState {
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .badge.fs-3 {
        font-size: 1.25rem !important;
    }
}

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

.card {
    animation: fadeInUp 0.3s ease-out;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--bs-info);
    outline-offset: 2px;
}

/* Custom icon styling */
.fas {
    vertical-align: baseline;
}

/* Enhanced alert styling */
.alert {
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--bs-success);
}

.alert-danger {
    border-left-color: var(--bs-danger);
}

/* File input styling */
.form-control[type="file"] {
    padding: 0.75rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background-color: var(--bs-secondary);
    border: none;
    border-radius: 0.375rem;
    color: white;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background-color: var(--bs-info);
}
