/* Timesheet Reporter Styles */

/* Website Color Variables */
:root {
    --ts-background-color: #F5F3F1;    /* Primary background color */
    --ts-accent-color: #F6CA21;        /* Yellow accent highlight color */
    --ts-text-color: #000000;          /* Text color */
    --ts-light-accent: #FBE9A0;        /* Lighter shade of accent for hover states */
    --ts-border-color: #E0DDD8;        /* Border color derived from background */
    --ts-hover-bg: #ECEAE7;            /* Slightly darker background for hover states */
}

/* Remove all width constraints */
.timesheet-reporter-container,
.timesheet-report,
.timesheet-report-summary,
.timesheet-report-totals,
.timesheet-report-tabs,
.timesheet-table-format,
.timesheet-export-options {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

.timesheet-reporter-container {
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--ts-text-color);
}

/* Upload Form */
.timesheet-upload-form {
    margin-bottom: 30px;
    width: 100%;
}

.timesheet-drop-area {
    border: 2px dashed var(--ts-border-color);
    border-radius: 6px;
    padding: 40px;
    text-align: center;
    background-color: var(--ts-background-color);
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.timesheet-drop-area.highlight {
    background-color: var(--ts-light-accent);
    border-color: var(--ts-accent-color);
}

.timesheet-drop-area h3 {
    margin-top: 0;
    font-weight: 500;
    color: var(--ts-text-color);
}

.timesheet-drop-area p {
    margin: 10px 0;
    color: var(--ts-text-color);
}

.timesheet-drop-area input[type="file"] {
    display: inline-block;
    margin: 15px 0;
}

/* Buttons */
#timesheetUploadBtn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--ts-accent-color);
    color: var(--ts-text-color);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

#timesheetUploadBtn:hover {
    background-color: var(--ts-light-accent);
}

/* Processing Indicator */
.timesheet-processing-indicator {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background-color: var(--ts-background-color);
    border-radius: 4px;
    color: var(--ts-text-color);
    width: 100%;
    box-sizing: border-box;
}

/* Report Container */
.timesheet-report {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
    color: var(--ts-text-color);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.timesheet-report-summary {
    margin-bottom: 30px;
    width: 100%;
}

.timesheet-report-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.timesheet-report-total {
    flex: 1;
    min-width: 200px;
    background-color: var(--ts-background-color);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    border-left: 4px solid var(--ts-accent-color);
}

.timesheet-report-total h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--ts-text-color);
    font-weight: 500;
}

.timesheet-report-total p {
    font-size: 24px;
    font-weight: 600;
    color: var(--ts-text-color);
    margin-bottom: 0;
}

/* Tabs */
.timesheet-report-tabs {
    margin-top: 30px;
    width: 100%;
}

.timesheet-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--ts-border-color);
    margin-bottom: 20px;
    width: 100%;
    overflow-x: auto;
}

.timesheet-tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--ts-text-color);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.timesheet-tab-button:hover {
    color: var(--ts-text-color);
    background-color: var(--ts-hover-bg);
}

.timesheet-tab-button.active {
    color: var(--ts-text-color);
    border-bottom-color: var(--ts-accent-color);
    font-weight: 600;
    background-color: var(--ts-light-accent);
}

.timesheet-tab-content {
    display: none;
    width: 100%;
}

.timesheet-tab-content.active {
    display: block;
}

/* Tables */
.timesheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    table-layout: auto;
}

.timesheet-table th, 
.timesheet-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ts-border-color);
}

.timesheet-table th {
    background-color: var(--ts-accent-color);
    font-weight: 600;
    color: var(--ts-text-color);
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* TableSorter styling */
.timesheet-table thead th {
    background-image: url('data:image/gif;base64,R0lGODlhFQAJAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==');
    background-position: center right;
    background-repeat: no-repeat;
    padding-right: 20px;
}

.timesheet-table thead th.tablesorter-headerAsc {
    background-image: url('data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7');
}

.timesheet-table thead th.tablesorter-headerDesc {
    background-image: url('data:image/gif;base64,R0lGODlhFQAEAIAAACMtMP///yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7');
}

.timesheet-table thead th.tablesorter-headerUnSorted:hover,
.timesheet-table thead th.tablesorter-headerAsc:hover,
.timesheet-table thead th.tablesorter-headerDesc:hover {
    background-color: var(--ts-hover-bg);
}

.timesheet-table tbody tr:hover {
    background-color: var(--ts-hover-bg);
}

.timesheet-table tfoot th {
    border-top: 2px solid var(--ts-accent-color);
    font-weight: 700;
    background-color: var(--ts-accent-color);
}

/* Full table format specific styles */
.timesheet-full-table {
    table-layout: auto;
    border: 1px solid var(--ts-border-color);
    width: 100%;
}

.timesheet-full-table th {
    background-color: var(--ts-accent-color);
    color: var(--ts-text-color);
}

.timesheet-full-table tbody tr:nth-child(even) {
    background-color: var(--ts-background-color);
}

.timesheet-full-table td {
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Remove scrollbars from table container */
.timesheet-table-format {
    width: 100%;
    overflow: visible;
    max-height: none;
}

/* Detailed Report */
.timesheet-detailed-report {
    margin-top: 20px;
    width: 100%;
}

.timesheet-client {
    margin-bottom: 30px;
    width: 100%;
}

.timesheet-client h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ts-text-color);
    border-bottom: 1px solid var(--ts-border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.timesheet-project {
    margin-left: 20px;
    margin-bottom: 20px;
}

.timesheet-project h5 {
    font-size: 16px;
    font-weight: 500;
    color: var(--ts-text-color);
    margin-bottom: 10px;
}

.timesheet-phase {
    margin-left: 20px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--ts-background-color);
    border-radius: 4px;
}

.timesheet-phase h6 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--ts-text-color);
}

.timesheet-phase-summary p {
    margin: 5px 0;
    color: var(--ts-text-color);
}

.timesheet-phase-summary strong {
    font-weight: 600;
    color: var(--ts-text-color);
}

/* Export Options */
.timesheet-export-options {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--ts-border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.timesheet-export-buttons {
    display: flex;
    gap: 10px;
}

/* Fixed button styling */
.timesheet-export-buttons button,
.timesheet-share-url-container button {
    padding: 10px 20px;
    background-color: var(--ts-accent-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: var(--ts-text-color);
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

.timesheet-export-buttons button:hover,
.timesheet-share-url-container button:hover {
    background-color: var(--ts-light-accent);
}

.timesheet-share-section {
    margin-left: auto;
    background-color: var(--ts-background-color);
    border: 1px solid var(--ts-border-color);
    border-radius: 6px;
    padding: 15px;
    max-width: 500px;
}

.timesheet-share-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--ts-text-color);
    font-size: 16px;
    font-weight: 600;
}

.timesheet-share-link p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: var(--ts-text-color);
}

.timesheet-share-url-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.timesheet-share-url-container input {
    padding: 10px 12px;
    border: 1px solid var(--ts-border-color);
    border-radius: 4px;
    flex-grow: 1;
    background-color: #FFFFFF;
    color: var(--ts-text-color);
    font-size: 14px;
    height: 40px;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .timesheet-report, 
    .timesheet-report * {
        visibility: visible;
    }
    
    .timesheet-report {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
    
    .timesheet-export-options {
        display: none;
    }
    
    .timesheet-tab-button {
        display: none;
    }
    
    .timesheet-tab-content {
        display: block !important;
        margin-bottom: 30px;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .timesheet-tabs-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .timesheet-tab-button {
        border: 1px solid var(--ts-border-color);
        border-radius: 4px;
        margin-bottom: 5px;
    }
    
    .timesheet-tab-button.active {
        background-color: var(--ts-accent-color);
        color: var(--ts-text-color);
        border-color: var(--ts-accent-color);
    }
    
    .timesheet-table {
        display: block;
        overflow-x: auto;
    }
    
    .timesheet-report-total {
        min-width: 100%;
    }
    
    .timesheet-share-link {
        margin-left: 0;
        margin-top: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timesheet-share-link input {
        width: 100%;
    }
}