/*
 * jch-noise-by_hour 0.1
 *
 */

/* 
#jch-noise_by_hour th { text-align: center }

 
#jch-noise_by_hour th, #jch-noise_by_hour td {
  font-family: Verdana,Geneva,sans-serif;
  font-size: 12px;
  padding: 0 5px;
	text-align: right;
}
*/

a { outline: none; border: none;}


.report_options_row { display: flex; }
.report_options_row >  div { display: block; padding: 1em; flex: 1; }

.report_options_row.print_and_graph {
	border: solid 1px #ccc;
	border-radius: 4px;
	max-width: 50%;
	}

.report_options_row > .monitor_id { min-width: 70%;}

.jch-noise input[type="text"],
.jch-noise select {
	width: 100%;
	margin-bottom: 1em;
	}

.jch-noise input[type="checkbox"] + label {
	font-weight: 800;
}

label a:before { content: "("}
label a:after { content: ")"}
label a {font-weight: 100; border: none; outline: none;}


label span.subtext {
	display: block;
	font-weight: normal;
	font-size: smaller;
}


.jch-noise input[type="checkbox"] {
	margin-bottom: 1em;
	margin-right: 7px;
	margin-left: 20px;
}	

.jch-noise .checkbox_all {
margin-left: 0;
}

.jch-noise .checkbox_subtotal {
margin-left: 0;
}


.jch-noise input[type="submit"] {
	display: block;
/*	margin-top: 2em; */
	margin-bottom: 2em;
	background-color: #11567D;	
	}


.checkbox_wrapper {
	height: 200px;
	margin: 0 0 2rem;
	border: solid 1px #aaa;
	border-radius: 5px;
	padding-bottom: 8px;	
}

.checkbox_select {
	border: none;
	height: calc(100% - 1rem);
	overflow: auto;
	margin-top: 12px;
  margin-left: 6px;
	font-size: 12px;
}

/* Hour selectors */

.jch-noise input.penalty + span {
	color: orange;
}
.jch-noise input.penalty.fq  +  span {
	color: red;
}
.jch-noise input.fq  +  span {
	color: yellow;
}

.flight_type_selections_wrapper,
.date_selections_wrapper {
	max-width: 50%;
}

.flight_type_selections,
.noise_level_selections {
	min-width: 20%;	
	max-width: 20%;
	}



body.print-jch-noise_records p.header,
body.print-jch-noise_records table,
body.print-jch-noise_records {
	width: 750px;
	overflow-x: hidden;
	margin: 0;
	padding: 0;
	}
body.print-jch-noise_records {
	margin-left: 12px;
	}

body.print-jch-noise_records table.jch-noise tr,
body.print-jch-noise_records table.jch-noise td {
	border: none;	
	line-height: normal;
}

	
table.jch-noise tr.total {
	border-top: solid 2px #888;
	border-bottom: none;
}	

table.jch-noise tr.total td { font-weight: bold; margin: 12px 0; line-height: 2em; }
table.jch-noise tr.total td span { font-weight: normal; }

.jch-noise_no_records { width: 100%; margin-bottom: 3em; color: #c00;}

body.print-jch-noise_records p.header,
.jch-noise_records p.header { text-align: center; font-weight: bold; }

body.print-jch-noise_records p.header,
.jch-noise_records p.header:first-of-type { margin-bottom: 0; }

.jch-noise_records span.print_button,
.jch-noise_records span.close {
	top: 10px;	
	height: 12px;
	position: absolute;
	z-index: 200;
	right: 10px;
}
.jch-noise_records span.print_button {
		right: auto;
		left: 10px;
	}

.jch-noise_records span.close a {
	text-decoration: none ;
	box-shadow: none;
	border: 1px solid #58A;
	border-radius: 2px;
	padding: 1px;
	color: #58A;
}

.jch-noise_records span.close a:focus,
.jch-noise_records span.close a:hover
 {
	 	color: #000;
}

.jch-noise_records tr { border-bottom: none; }


.jch-noise_records tr.subtotal {
	border-top: solid 1px #222;
	padding-bottom: 3em;
}
.jch-noise_records tr.subtotal td {
	padding-bottom: 3em;
}


body.print-jch-noise_records p.header span.report_date,
.jch-noise_records p.header span.report_date,
.jch-noise_records p.header span.report_ip 
  {
	float: left;
	font-weight: 100;
	font-size: smaller;
	margin-top: 4px;
}

body.print-jch-noise_records p.header span.report_ip, 
.jch-noise_records p.header span.report_ip 
  {
	font-weight: 100;		
	font-size: smaller;		
	float: right;
}

body.print-jch-noise_records p.header span.report_title, 
.jch-noise_records p.header span.report_title  {
	margin-right: 80px;
}

body.print-jch-noise_records p.header span.report_query, .jch-noise_records p.header span.report_query {
	font-weight: normal;
	font-size: smaller;
	text-transform: lowercase;
	width: 100%;
	margin: 0 0 2em !important;
	padding: 0;
	display: block;
}

body.print-jch-noise_records p.header span.report_query:before,
.jch-noise_records p.header span.report_query:before  { content: "(";}


body.print-jch-noise_records .jch-noise_records p.header span.report_query:after,
.jch-noise_records p.header span.report_query:after  { content: ")";}

.jch-noise_records {
	border: solid 1px #ccc;
	padding: 8px;
	position: fixed;
	z-index: 100;
	background: #fff;
	height: 80%;
	box-shadow: 3px 3px 3px;
	left: 20%;
	right: 20%;
	top: 10%;
	padding-top: 2em;
	border-radius: 3px 3px 0 0;
}

.jch-noise_records .print_button a { font-size: 0; color: transparent;}
.jch-noise_records .print_button a::before {
	font-family: dashicons;
	color: #58A;
	content: "\f193";
	font-size: 24px;
	display: table;
	margin: 0;
	padding: 0;
	line-height: 1;
}




.jch-noise_records .jch_table_wrapper {
	overflow-y: scroll;
	margin-top: 4%;
	height: 90%;
}


span.report_query,
 .jch-noise_records p.header:first-of-type,
 .jch-noise_records th,
 .jch-noise_records td
  {
	font-size: 72% !important;
	}

  span.report_title {
	display: inline-block;
	float: none;
	text-align: center;
	margin: 0 0 0 1rem !important;
	width: auto !important;
}

	span.report_title,
	span.report_ip
	 {
		margin-top: 0 !important;
	}

	span.report_ip
	 {
		margin-right: 10px;
	}
	
	span.report_query {
	line-height: 16px !important;
	float: left;
	margin: 1rem 0 1rem !important;
}	


ul.noise_monitor_list {
	font-size: 80%;
	list-style: none;
}



/* Enhanced Chart Styling for JCH Noise Monitoring */

/* Chart Container Enhancement */
#jch_noise_chart_container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

#jch_noise_chart_container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    border-radius: 12px 12px 0 0;
}

#jch_noise_chart {
    max-height: 450px;
    width: 100%;
    border-radius: 8px;
}

/* Time Period Legend */
.jch-time-period-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.jch-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jch-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.jch-legend-penalty { background: rgba(239, 68, 68, 0.8); }
.jch-legend-fly-quiet { background: rgba(185, 28, 28, 0.9); }
.jch-legend-normal { background: rgba(34, 197, 94, 0.8); }
.jch-legend-pe-fqe { background: rgba(251, 146, 60, 0.8); }

/* Noise Level Scale */
.jch-noise-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px 16px;
    background: linear-gradient(90deg, 
        rgba(34, 197, 94, 0.15) 0%, 
        rgba(251, 191, 36, 0.15) 33%, 
        rgba(251, 146, 60, 0.15) 66%, 
        rgba(239, 68, 68, 0.15) 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.jch-noise-level {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Chart Statistics Summary */
.jch-chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding: 20px 0;
}

.jch-stat-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 16px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.jch-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px;
    line-height: 1.2;
}

.jch-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Chart Loading State */
.jch-chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #64748b;
}

.jch-chart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: jchSpin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes jchSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart Error State */
.jch-chart-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    border: 1px dashed #ef4444;
}

.jch-chart-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #jch_noise_chart_container {
        padding: 16px;
        margin: 16px 0;
    }
    
    .jch-time-period-legend {
        flex-direction: column;
        gap: 12px;
    }
    
    .jch-legend-item {
        justify-content: center;
    }
    
    .jch-noise-scale {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .jch-chart-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #jch_noise_chart {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .jch-time-period-legend {
        padding: 12px;
    }
    
    .jch-legend-item {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .jch-stat-value {
        font-size: 20px;
    }
    
    .jch-stat-label {
        font-size: 11px;
    }
}

/* Integration with existing jch-noise styles */
.jch-noise_records .jch-time-period-legend,
.jch-noise_records .jch-noise-scale,
.jch-noise_records .jch-chart-stats {
    font-size: 72% !important;
}

.jch-noise_records .jch-legend-item {
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.jch-noise_records .jch-stat-value {
    font-size: 18px !important;
}

.jch-noise_records .jch-stat-label {
    font-size: 10px !important;
}

/* Print-specific styles for charts */
@media print {
   body { 
       margin: 0; 
       padding: 15px; 
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       background: white;
       color: #000;
       line-height: 1.4;
   }
   
   table { 
       width: 100%; 
       border-collapse: collapse; 
       margin: 20px 0;
   }
   
   th, td { 
       border: 1px solid #ccc; 
       padding: 8px; 
       text-align: left; 
       font-size: 12px;
   }
   
   th { 
       background: #f8f9fa; 
       font-weight: bold;
   }
   
   .total { 
       border-top: 2px solid #000; 
       font-weight: bold;
   }
   
   .print-chart { 
       page-break-inside: avoid;
       text-align: center; 
       margin: 30px 0;
       width: 100%;
   }
   
   .print-chart img {
       width: 100% !important;
       max-width: none !important;
       height: auto !important;
       display: block !important;
       margin: 0 auto !important;
       border: 1px solid #ddd;
       border-radius: 8px;
       box-shadow: 0 2px 8px rgba(0,0,0,0.1);
   }
   
   .print-chart h3 {
       margin: 10px 0 20px 0; 
       color: #1e40af;
       font-size: 18px;
   }
   
   .chart-group { 
       page-break-before: auto; 
       margin: 40px 0;
   }
   
   .header {
       margin-bottom: 20px;
       text-align: center;
       font-weight: bold;
   }
}

@page {
   margin: 0.5in;
}

.report-headers-only {
   margin-bottom: 30px;
   padding-bottom: 20px;
   border-bottom: 2px solid #1e40af;
}

.plugin-info {
   text-align: center;
   font-size: 10px;
   color: #666;
   margin-top: 30px;
   border-top: 1px solid #ccc;
   padding-top: 10px;
}

@media only print {

html,
body,
table 

{ 
  width: 760px; 
  overflow-x: hidden;
  margin: 0 0 0 1%; 
	padding: 0; 
	}


.print_button,
.close { display: none !important;
}

   body { 
       margin: 0; 
       padding: 15px; 
       font-family: Arial, Helvetica, sans-serif;  /* Sans-serif base */
       background: white;
       color: #000;
       line-height: 1.4;
   }
   
   /* ADD THESE MISSING HEADER STYLES */
   .header,
   p.header {
       text-align: center;
       font-weight: bold;
       margin-bottom: 20px;
       font-family: Arial, Helvetica, sans-serif;
   }
   
   .report_date {
       float: left;
       font-weight: normal;
       font-size: 10px;
       margin-top: 4px;
       font-family: Arial, Helvetica, sans-serif;
   }
   
   .report_ip {
       float: right;
       font-weight: normal;
       font-size: 10px;
       font-family: Arial, Helvetica, sans-serif;
   }
   
   .report_title {
       display: inline-block;
       text-align: center;
       margin: 0 80px;
       font-weight: bold;
       font-family: Arial, Helvetica, sans-serif;
   }
   
   .report_query {
       clear: both;
       font-weight: normal;
       font-size: 10px;
       text-transform: lowercase;
       text-align: center;
       margin: 10px 0 20px 0;
       display: block;
       width: 100%;
       font-family: Arial, Helvetica, sans-serif;
   }
   
   .report_query:before { content: "("; }
   .report_query:after { content: ")"; }

}
