﻿/* Content/StockModal.css - FIXED VERSION */

/* ==================== VARIABLES ==================== */
/*:root {
    --primary-blue: #003D7A;
    --primary-orange: #FF9933;
    --success-green: #27AE60;
    --danger-red: #E74C3C;
    --light-gray: #f5f5f5;
    --modal-bg: #3d2a1f;
}*/

/* ==================== GLOBAL ==================== */
/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
}*/

/* ==================== HEADER ==================== */
/*.main-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.brand-main {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-blue);
}

.brand-sub {
    color: var(--primary-orange);
    font-size: 14px;
}

.btn-outline-custom {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 600;
    background: white;
}

    .btn-outline-custom:hover {
        background-color: var(--primary-blue);
        color: white;
    }

.btn-primary-custom {
    background-color: var(--primary-blue);
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 600;
    color: white;
}
*/
/* ==================== CONTENT SECTION ==================== */
/*.content-section {
    padding: 50px 0;
    min-height: 80vh;
}*/

/* ==================== REPORT CARDS ==================== */
.report-card {
    background: white;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

    .report-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

.report-date {
    background-color: var(--primary-orange);
    color: #000;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.report-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.report-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.btn-view-details {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s;
}

    .btn-view-details:hover {
        background-color: #002a57;
    }

/* ==================== CUSTOM MODAL - FIXED ==================== */
/* Modal Backdrop - CRITICAL FIX */
.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.7);
}

    .modal-backdrop.show {
        opacity: 0.7;
    }

/* Modal Container - CRITICAL FIX */
.modal {
    z-index: 1050 !important;
}

.modal-dialog {
    max-width: 600px;
    z-index: 1050 !important;
    position: relative;
}

.custom-modal {
    background-color: white;
    border-radius: 15px;
    border: none;
    position: relative;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1050 !important;
}

/* Close Button */
.btn-close-custom {
    position: absolute;
    top: -18px;
    right: -44px;
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1060;
    transition: background-color 0.3s;
    margin-top:30px;
}

    .btn-close-custom:hover {
        background: rgba(0, 0, 0, 0.5);
    }

    .btn-close-custom i {
        color: white;
        font-size: 18px;
    }

/* Modal Body */
.modal-body {
    padding: 20px 35px 30px;
    background: white;
    border-radius: 15px;
}
#modalDesc p span {
    font-family: var(--bs-body-font-family-regular) !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    color: #757575 !important;
}
.modal-title {
    font-size: 28px;
    color: #000000;
    margin-bottom: 25px;
    font-family: var(--bs-body-font-family-regular);
    font-weight: 400;
}

/* Modal Content Text */
.modal-content-text {
    margin-bottom: 30px;
    font-size: 15px;
    color: #757575;
}

.modal-point {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
    display: block;
    gap: 10px;
}

    .modal-point .bullet {
        color: var(--primary-blue);
        font-weight: bold;
        font-size: 18px;
        flex-shrink: 0;
    }

/* Modal Footer Buttons */
.modal-footer-buttons {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.recommendation-label {
    font-size: 15px;
    color: #000;
    margin-right: 15px;
    font-weight: 400;
    font-family: var(--bs-body-font-family-regular);
}

.btn-buy-modal {
    background-color: #229954 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: background-color 0.3s !important;
    font-family: var(--bs-body-font-family-bold);
}

   /* .btn-buy-modal:hover {
        background-color: #229954 !important;
        color: #fff;
    }*/

.btn-report {
    background-color: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    padding: 8px 25px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

    .btn-report:hover {
        background-color: var(--primary-orange);
        color: white;
    }

    .btn-report i {
        font-size: 14px;
    }

/* Modal Animation - FIXED */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: translate(0, 0) !important;
}

/* Ensure modal is visible - CRITICAL FIX */
.modal.show {
    display: block !important;
    opacity: 1 !important;
}


/* --- The Expandable Table Section --- */
#expandableTableArea {
    width: 100%;
    /* Hidden by default */
    display: none;
    margin-bottom: 20px;
    background-color: #F5F9FC;
    border-radius: 8px;
    overflow: hidden; /* For border radius on child elements */
    padding-bottom: 10px;
}

    /* Class added via JS to show content */
    #expandableTableArea.show {
        display: block;
    }

/* Table Styling */
.stock-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

    .stock-table thead th {
        color: #7A869A;
        font-weight: 500;
        font-size: 14px;
        padding: 15px 20px;
        border-bottom: 1px solid #E1E7ED;
    }

    .stock-table tbody tr {
        background-color: #F5F9FC;
        border-bottom: 1px solid #E1E7ED;
    }

    .stock-table td {
        padding: 15px 20px;
        color: #172B4D;
        font-weight: 600;
        vertical-align: middle;
    }

/* Styling for stock name subtitles */
.stock-name-main {
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.stock-name-sub {
    font-weight: 400;
    color: #7A869A;
    font-size: 12px;
}

/* The Green Buy Button */
.buy-btn {
    background-color: #10B981;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .buy-btn:hover {
        background-color: #0E9F6E;
    }

/* --- The Orange Toggle Button (Trigger) --- */
.toggle-trigger-btn {
    background-color: #F58220; /* Exact orange from image */
    color: white;
    border: none;
    padding: 7px;
    border-radius: 50px; /* Pill shape */
    font-size: 10px;
    /*font-weight: 200;*/
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    outline: none;
}

.toggle-trigger-btn-grey {
    background-color: #757575; /* Exact orange from image */
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50px; /* Pill shape */
    font-size: 10px;
    /*font-weight: 200;*/
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    outline: none;
}

    .toggle-trigger-btn:hover {
        background-color: #E07010;
    }

/* CSS Chevron Icon */
.chevron-arrow {
    border: solid white;
    border-width: 0 1px 1px 0;
    display: inline-block;
    padding: 2px;
    transition: transform 0.3s ease;
}

    /* Down state (default) */
    .chevron-arrow.down {
        transform: rotate(45deg);
        margin-bottom: 3px; /* slight optical adjustment */
    }

    /* Up state (when active) */
    .chevron-arrow.up {
        transform: rotate(-135deg);
        margin-top: 3px; /* slight optical adjustment */
    }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .modal-body {
        padding: 30px 25px 25px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-point {
        font-size: 13px;
    }

    .modal-footer-buttons .d-flex {
        flex-direction: column;
        gap: 15px;
    }

    .btn-report {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .report-card {
        padding: 20px 15px;
    }

    .report-title {
        font-size: 11px;
    }

    .btn-close-custom {
        width: 30px;
        height: 30px;
    }

        .btn-close-custom i {
            font-size: 16px;
        }
}

@media (max-width: 431px) {
    .report-title {
        font-size: 11px;
    }

    .toggle-trigger-btn {
        font-size: 8px;
        width: fit-content;
    }
}
