/* Error Messages */
.jch-port_no_records {
   width: 100%;
   margin-bottom: 3em;
   padding: 1rem;
   background: #fef2f2;
   border: 1px solid #fecaca;
   border-radius: 6px;
   color: #dc2626;
   text-align: center;
}

.jch-port_no_records.error {
   background: #fffbeb;
   border-color: #fed7aa;
   color: #d97706;
}

#btn_Submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#jch-port_packages {
	position: relative;
	margin-bottom: 2em;
	table-layout: fixed;
}


#jch-port_packages > section { border: none; }

#jch_port_table_wrapper {
	position: absolute;
	z-index: 100;
	width: 100%;
	border: solid 1px #ccc;
	padding: 1em;
	background: #fff;
	box-shadow: 1px 4px 8px #333;
}

#jch_port_table_wrapper span.print_button, #jch_port_table_wrapper span.close {
	top: 10px;
	height: 12px;
	position: absolute;
	z-index: 200;
	right: 10px;
}

#jch_port_table_wrapper span.print_button {
	right: auto;
	left: 10px;
}
#jch_port_table_wrapper .print_button a::before {
	font-family: dashicons;
	color: #58A;
	content: "\f193";
	font-size: 24px;
	display: table;
	margin: 0;
	padding: 0;
	line-height: 1;
}
#jch_port_table_wrapper span.close a {
	text-decoration: none;
	box-shadow: none;
	border: 1px solid #58A;
	border-radius: 2px;
	padding: 1px;
	color: #58A;
}

#jch_port_table_wrapper .report_header {
	margin: 2em 0 0 0;
}
#jch_port_table_wrapper .report_header p:first-child {
	margin: 1em 0 0 0;
}
	
	
#jch_port_table_wrapper span.report_title {
	display: inline-block;
	float: none;
	text-align: center;
	margin: 0 !important;
	width: 70% !important;
	font-weight: 600;
}

.jch-port .report_options_row.report_and_graph { margin: 2em 0 0;}


.jch_port_table_wrapper .report_header span.close a { float: right; }

.jch_port_table_wrapper .report_header p { margin: 0 0 2em;}
.jch_port_table_wrapper .report_header p { font-size: 90%; margin: 0;}
.jch_port_table_wrapper .report_header p .report_title { width: 80% !important; text-align: center; display: inline-block;}

.jch_port_table_wrapper .report_header p .report_date {
	width: 15%;
	display: inline-block;
	font-size: 72%;
}

.jch_port_table_wrapper .report_header p span.report_query {
	margin: 0 0 1em;
}

.jch_port_table_wrapper .report_header p span.report_query {
	margin: 0 0 1em;
	display: block;
	text-align: center;
	width: 100%;
	margin: .4em 0 2.3em !important;
}

.jch-port_packages_table { font-size: 12px; }
.jch-port_packages_table tr { border-bottom: none; }
.jch-port_packages_table td.money {
	text-align: right;
	}

.jch-port_packages_table tr.main-summary {
	 font-weight: bold;
   background-color: #e3f2fd;
	}

.jch-port_packages_table tr.secondary-header
 { font-weight: 500; padding-left: 2em;
   background-color: #e3f2fd;
	 text-transform: uppercase;
   }

.jch-port_packages_table tr.subtotal td {
	padding-bottom: 2em;
	}
 
.jch-port_packages_table tr.subtotal td:first-child
 { font-weight: 500; padding-left: 2em; }
 
.jch-port_packages_table tr.total,
.jch-port_packages_table tr.grand_total
 { font-weight: 600; }

.jch-port_packages_table .detail-row td:first-child {	padding-left: 1em; }
.jch-port_packages_table .detail-subtotal td:first-child {	padding-left: 2em; padding-bottom: 1em; }

/* Responsive Design */
@media (max-width: 768px) {
   .report_options_row {
       flex-direction: column;
   }
   
   .port_filters_wrapper {
       flex-direction: column;
   }
   
   .jch-port_records {
       left: 2%;
       right: 2%;
       top: 5%;
       height: 90%;
   }
   
   .jch-port_records table,
   .jch-port_records th,
   .jch-port_records td {
       font-size: 0.7rem;
   }
   
   .jch-port_records th,
   .jch-port_records td {
       padding: 0.25rem;
   }
   
   #jch_port_chart_container {
       padding: 16px;
       margin: 16px 0;
   }
   
   #jch_port_chart {
       max-height: 300px;
   }
}

@media (max-width: 480px) {
   .date_selections_wrapper {
       min-width: 100%;
   }
   
   .filter_group {
       min-width: 100%;
   }
   
   .jch-port_records {
       left: 1%;
       right: 1%;
       top: 2%;
       height: 96%;
   }
   
   .jch-port_records table {
       font-size: 0.6rem;
   }
}


@media print {
    /* Hide everything on the page when printing */
    body.printing-report * {
        visibility: hidden;
    }
    
    /* Show only the report modal and its contents */
    body.printing-report .jch-port_packages,
    body.printing-report .jch-port_packages * {
        visibility: visible;
    }
    
    #jch_port_table_wrapper { box-shadow: none !important;}
    
    /* Position the modal normally for print */
    body.printing-report .jch-port_packages {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
    }
    
    /* Ensure table content is visible */
    body.printing-report .jch_port_table_wrapper {
        overflow: visible !important;
        height: auto !important;
    }
    
    /* Ensure chart is visible if present */
    body.printing-report #jch_port_chart_container,
    body.printing-report #jch_port_chart {
        visibility: visible !important;
    }
}

/* Print Styles */
@media print {
   body { 
       margin: 0; 
       padding: 0; 
       font-family: Arial, sans-serif;
       background: white;
       color: #000;
       line-height: 1.4;
   }
   
   table { 
       width: 100%; 
       border-collapse: collapse; 
       margin: 0 0;
       page-break-inside: auto;
   }
   
   th, td { 

   }
   
   th { 
       background: #f8f9fa !important; 
       font-weight: bold;
   }
   
   .total { 
       border-top: 2px solid #000 !important; 
       font-weight: bold;
       background: #f0f0f0 !important;
   }
   
   .subtotal {
       background: #f8f8f8 !important;
       border-top: 1px solid #666 !important;
       font-weight: bold;
   }
   
   
   #masthead,
   #myModalBackground,
   .print_button,
   .close { 
       display: none !important;
   }
   
   .jch-port_records {
       position: static !important;
       height: auto !important;
       box-shadow: none !important;
       border: none !important;
       padding: 0 !important;
       margin: 0 !important;
   }
   
   .jch_port_table_wrapper {
       overflow: visible !important;
       height: auto !important;
       margin: 0 !important;
       padding: 0 !important;
   }
}

@page {
   margin: 0;
   size: landscape;
}