/* Fund Performance Viewer - Frontend Styles */

:root {
    --button_gradient_top_color: var(--awb-color7);
}

.fpv-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Section Titles */
.fpv-section-title {
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
    color: #333333;
    text-align: center;
}

/* Latest NAV Section */
.fpv-latest-nav-section {
    margin-bottom: 40px;
}

.fpv-latest-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Historical NAV Section */
.fpv-historical-nav-section {
    margin-top: 40px;
}

/* Header Section - Red Background */
.fpv-header {
    background-color: var(--button_gradient_top_color, #d32f2f);
    padding: 30px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-end;
    margin-bottom: 0;
    border-radius: 0;
}

.fpv-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.fpv-control-group label {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fpv-select,
.fpv-datepicker {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.fpv-datepicker {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23333' d='M14 2h-1V0h-2v2H5V0H3v2H2C.9 2 0 2.9 0 4v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H2V7h12v7z'/%3E%3C/svg%3E");
}

.fpv-select:focus,
.fpv-datepicker:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.fpv-select option {
    padding: 10px;
}

/* Content Section */
.fpv-content {
    background-color: #ffffff;
    padding: 20px;
    min-height: 400px;
}

.fpv-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Table Styles */
.fpv-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.fpv-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fpv-table thead {
    background-color: #f5f5f5;
}

/* Latest NAV Table - Red Header */
.fpv-latest-table thead {
    background-color: var(--button_gradient_top_color, #d32f2f);
}

.fpv-latest-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fpv-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fpv-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    color: #333333;
    font-size: 14px;
}

.fpv-table tbody tr {
    background-color: #ffffff;
}

.fpv-table tbody tr:hover {
    background-color: #f9f9f9;
}

.fpv-table tbody tr:last-child td {
    border-bottom: none;
}

/* Latest NAV table rows styling */
.fpv-latest-table tbody tr {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.fpv-latest-table tbody tr:first-child {
    border-top: 1px solid #e0e0e0;
}

.fpv-latest-table tbody tr:last-child {
    border-bottom: 1px solid #e0e0e0;
}

.fpv-latest-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.fpv-latest-table tbody td {
    border-right: 1px solid #e0e0e0;
}

.fpv-latest-table tbody td:last-child {
    border-right: none;
}

.fpv-no-data {
    text-align: center;
    color: #999;
    padding: 40px 20px !important;
    font-style: italic;
}

/* Datepicker UI Override */
.ui-datepicker {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ui-datepicker-header {
    background-color: var(--button_gradient_top_color, #d32f2f);
    color: #ffffff;
    border-radius: 4px 4px 0 0;
}

.ui-datepicker-title {
    color: #ffffff;
}

.ui-datepicker-calendar .ui-state-active,
.ui-datepicker-calendar .ui-state-hover {
    background-color: var(--button_gradient_top_color, #d32f2f);
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fpv-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .fpv-control-group {
        width: 100%;
    }
    
    .fpv-section-title {
        font-size: 28px;
    }
    
    .fpv-latest-nav-section {
        margin-bottom: 30px;
    }
    
    .fpv-historical-nav-section {
        margin-top: 30px;
    }
    
    .fpv-table {
        font-size: 12px;
    }
    
    .fpv-table th,
    .fpv-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .fpv-header {
        padding: 20px 15px;
    }
    
    .fpv-content {
        padding: 15px;
    }
    
    .fpv-section-title {
        font-size: 24px;
    }
    
    .fpv-latest-nav-section,
    .fpv-historical-nav-section {
        margin-bottom: 20px;
    }
    
    .fpv-table {
        font-size: 11px;
    }
    
    .fpv-table th,
    .fpv-table td {
        padding: 8px 10px;
    }
}

