/* color palette:
 - green: #32A620
 - darkgreen: #397F19
 - tan: #F7F1CD
 - rust: #7D1921
 - navy: #2E3959
 - red:  #FF0000
 - warning: #FF3737
@import url(https://fonts.googleapis.com/css?family=Quicksand:300,400,700);
*/

:root {
  /* Color palette — green/organic theme for irrigation app */
  /* If you want to fully restyle, swap these values only */
  --ir-primary: #10b981;        /* emerald-500  — active/main actions */
  --ir-primary-dark: #059669;   /* emerald-600  — hover/pressed */
  --ir-primary-light: #6ee7b7;  /* emerald-400  — light accents */
  --ir-surface: #ffffff;        /* white        — cards/panels */
  --ir-background: #f1f5f9;     /* slate-100    — page bg */
  --ir-text: #1e293b;           /* slate-800    — primary text */
  --ir-text-muted: #64748b;     /* slate-500    — secondary text */
  --ir-border: #e2e8f0;         /* slate-200    — form borders */
  --ir-warning: #ef4444;        /* red-500      — errors/danger */
  --ir-warning-light: #f87171;  /* red-400      */
  --ir-info: #3b82f6;           /* blue-500     — info links */
  --ir-success: #10b981;        /* emerald-500  */
  --ir-card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05),
                    0 1px 6px 0 rgba(0, 0, 0, 0.1);
  --ir-card-radius: 8px;
  --ir-border-radius-sm: 6px;
  --ir-border-radius-lg: 12px;

  /* Spacing scale (4px grid) */
  --ir-spacing-xs: 4px;
  --ir-spacing-sm: 8px;
  --ir-spacing-md: 12px;
  --ir-spacing-lg: 16px;
  --ir-spacing-xl: 24px;
  --ir-spacing-2xl: 32px;

  /* Typography scale */
  --ir-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Noto Sans', Helvetica, Arial, 'Apple Color Emoji', 'Android Emoji',
    'Noto Color Emoji', sans-serif;
  --ir-font-family-serif: 'Merriweather', Georgia, serif;
  --ir-font-size-xs: 10pt;
  --ir-font-size-sm: 12pt;
  --ir-font-size-md: 14pt;
  --ir-font-size-lg: 16pt;
  --ir-font-size-xl: 20pt;
  --ir-font-size-2xl: 24pt;
  --ir-font-weight-normal: 400;
  --ir-font-weight-medium: 500;
  --ir-font-weight-semibold: 600;
  --ir-font-weight-bold: 700;
}

/* Override for dark mode / high contrast */
@media (prefers-color-scheme: dark) {
  :root {
    --ir-background: #0f172a;   /* slate-900 */
    --ir-surface: #1e293b;      /* slate-800 */
    --ir-text: #f8fafc;         /* slate-100 */
    --ir-text-muted: #94a3b8;   /* slate-400 */
    --ir-border: #334155;       /* slate-600 */
    --ir-primary: #34d399;      /* emerald-400 dark */
    --ir-primary-dark: #10b981; /* emerald-500 dark */
    --ir-border: #374151;       /* slate-700 */
  }
}

/* ---------- Font import (primary: Inter) ---------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--ir-spacing-sm);
  font-weight: var(--ir-font-weight-semibold);
  line-height: 1.25;
}

h1 { font-size: var(--ir-font-size-2xl); }
h2 { font-size: var(--ir-font-size-xl); }
h3 { font-size: var(--ir-font-size-lg); }
h4 { font-size: var(--ir-font-size-md); }
h5 { font-size: var(--ir-font-size-sm); }
h6 { font-size: var(--ir-font-size-xs); }

body {
	margin:0px;
	padding:0px;
	background-color:#397F19;
        font-family: var(--ir-font-family);
	font-size:var(--ir-font-size-sm);
}
div, p {
	margin:0px;
}

/******** Overall Layout Styles **********/

div.prehead {
	background-image: url('logo-for-web55.jpg');
	background-repeat: no-repeat;
	background-position: 10px 14px;
	background-color: #32A620;
	height:100px;
        font-family: var(--ir-font-family);
	font-size:var(--ir-font-size-sm);
}

div.prehead div.title {
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-sm);
	text-align:right;
	color:white;
	padding-top:30px;
	padding-right:10px;
}

div.prehead div.titleline {
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-sm);
	text-align:right;
	color:white;
	padding-top:10px;
	padding-right:10px;
}

div.header {
	background-color: #32A620;
	height:80px;
}

div.header div.title {
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-sm);
	text-align:right;
	color:white;
	padding-top:5px;
	padding-right:10px;
}

select.substation {
        font-family: var(--ir-font-family);
	background-color: #32A620;
	font-size: var(--ir-font-size-sm);
        color:white;
}

select.sysinfo {
        font-family: var(--ir-font-family);
	background-color: #32A620;
	font-size: var(--ir-font-size-sm);
        color:white;
}

div.header div.titlenote {
	font-size: 10pt;
	color:white;
	padding-left:8px;
}

div.footer {
	background-color: #32A620;
	color:white;
	text-align: right;
	padding-top:5px;
	padding-right:10px;
	font-size:9pt;
	clear: both;
}

/******** Clock Styles **********/

div.header div#status {
	float:left;
	!width: 240px;
	width: 25%;
	height: 100%;
	text-align:center;
	color:white;
        font-family: var(--ir-font-family);
	font-weight: 400;
	font-size: x-large;
	!padding-top: 23px;
	!padding-bottom: 12px;
	!background-color: #397F19;
	opacity: .85;
}
div.header #deviceTime span {
	display:inline-block;
	position:relative;
	margin-top: 2px;
	margin-bottom: 1px;
}
div.header #deviceTime span.time {
	text-align:right;
	!font-size:42pt;
	!top: 6px;
	!width: 160px;
	!letter-spacing: -3px;
}
div.header #deviceTime span.sep {
	!font-size:36px;
	!top: -.25em;
}
div.header #deviceTime span.second {
	text-align:left;
	!font-size:18pt;
	!top: -16px;
	!width: 36px;
	!letter-spacing: -1px;
}
div.header #deviceTime span.ampm {
	position:relative;
	!top:6px;
	!left: -38px;
	!font-size:18pt;
	!width: 36px;
	margin-left: 2px;
	text-align: right;
	
}
div.header #deviceDate {
	!margin-top:16px;
	!font-weight:400;
	font-size: large;
}

div#chartdiv {
    !width:660px;
    width:95%;
    height:330px;
}
div#chartdates {
    !width:660px;
    width:95%;
    text-align:center;
    margin:5px;
}

div#programmode table#stations {
    table-layout:fixed;
    width:100%;
}

div.content {
	background-color: #FCFAEB;
	color:black;
}

div.body {
	margin:0px;
	padding:0px;
/*	background-image: url(grass.jpg); */
}

div.panel {
/*	margin-left: 240px; */
	padding:12px;
	background-color: white;
}

div.panel div.title {
	font-weight: 700;
	font-size: 20pt;
	margin-bottom: 8px;
}

div.controlblock {
	border:5px solid #2E3959;
	border-radius: 12px;
	margin: 12px 0px;
	width:95%;
        display: flex;
        flex-direction: column;
}
div.controlblock p, div.controlblock div {
	padding: 2px 24px;
}
div.controlblock span.inlinespan {
       display:inline-flex;
       margin-left:50px;
}

span.stationName:after {
	content: ",";
}
span.stationName:last-child:after {
	content: "";
}

.stationTextarea, .stationTextbox {
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; 
}

.program {
	width:60%;
}

.program p:first-child {
	background-color: #2E3959;
	color: white
}

.program.disabled {
	border-color: #7D1921;
}
.program.disabled p:first-child {
	background-color: #7D1921;
	color: white
}
/******** General Global Styles **********/

#errorHint {
	color: #7D1921;
}
.inputError {
	color: #7D1921;
}
.showInterval {
	text-align:center;
}

.program p:first-child .val {
	color: white;
}
.val {
	font-weight: 700;
	color: #397F19;
}

.countdown, .rainsense {
	color: #7D1921;
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-sm);
	font-weight: 700;
}


/******** Navigation Button Styles **********/

#nav {
	margin-bottom:16px;
}
#nav button {
	padding:7px 16px;
	margin-right: 4px;
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-md);
	font-weight: 400;
	color:white;
	background-color:#2E3959;
	border:0px;
	border-radius: 8px;
	cursor: pointer;
}
#nav button.here {
	background-color: #32A620;
	height: 54px;
}
#nav button.home {
	background-image: url('home.png');
	background-repeat: no-repeat;
	background-position: center center;
	text-indent:-99999em;
	overflow:hidden;
	width: 40px;
}

/******** Button Styles **********/

button {
	padding: 4px 12px;
        font-family: var(--ir-font-family);
	font-size: var(--ir-font-size-sm);
	font-weight: 400;
	text-align: center;
	line-height: var(--ir-font-size-md);
	color: white;
	background-color: #397F19;
	border: 0px;
	border-radius: 12px;
	cursor: pointer;
}
button:hover {
	color: #F7F1CD;
}
button.on {
	background-color: #397F19;
}
button.off {
	background-color: #7D1921;
}
button.execute {
	background-color: #2E3959;
	margin: 2px;
}

button.help {
	font-weight: 700;
	background-color: #2E3959;
}

button.toggle {
	background-repeat: no-repeat;
	background-position: center center;
	!width: 304px;
	width: 224px;
	padding: 4px;
	text-align: center;
	color: #DDD;
}
button.toggle.on {
	background-color: #397F19;
	background-image: url('on.png');
}
/*
button.toggle.on:hover {
	color: #F7F1CD;
	background-image: url('off.png');
}
*/
button.toggle.off {
	background-color: #7D1921;
	background-image: url('off.png');
}
button.toggle.off.choice {
	background-color: #397F19;
	background-image: url('off.png');
}
button.grow {
    transform: scale(1.2);
}
/*
button.toggle.off:hover {
	color: #F7F1CD;
	background-image: url('on.png');
}
*/
button.toggle span.togglesep {
	display: inline-block;
	width: 50px;
}
button.toggle span.toggleleft {
	display: inline-block;
	text-align: right;
	!width: 120px;
	width: 80px;
}
button.toggle span.toggleright {
	display: inline-block;
	text-align:left;
	!width: 120px;
	width: 80px;
}
button.toggle.on span.toggleright, button.toggle.off span.toggleleft {
	font-weight: 400;
}
button.toggle.off span.toggleright, button.toggle.on span.toggleleft {
	font-weight: 700;
	color: white;
}

#controls button#cSubmit {
	background-color: #397F19;
}
#controls button#cSubmit:disabled {
	background-color: #AAA;
}
button.danger {
	background-color: #7D1921;
}

button.toggle.narrow {
	width: 140px;
}
button.toggle.narrow span.toggleright, button.toggle.narrow span.toggleleft {
	width: 36px;
}

#options button, #controls button {
	margin: 4px 0px;
}

button.weekday {
	width:100%;
}
button.pushon.on {
    font-weight: 700;
}

input.timeInput {
	font-size:var(--ir-font-size-sm);
}

/******** Camera Table Styles **********/
td.camera {
        overflow:hidden;
}

/******** Station Table Styles **********/

table.optionList {
	border:3px solid #2E3959;
	border-radius: 12px;
	padding: 4px;
	border-spacing: 0px;
	empty-cells: show;
	border-collapse: separate;
	table-layout:fixed;
	width:100%;
}

td.pluginName {
    text-align: right;
    padding: 0px 12px;
    color: #2E3959;
    font-weight: 700;
    width: 12em;
    height: 30px;
    white-space: nowrap;
}

td.stationNumber, td.stationShow, td.stationIgnore, td.stationMaster {
    text-align:center;
}

td.stationIgnoreWL {
    text-align:center;
}

td.stationName {
    text-align:left;
}

td.stationNotes {
    text-align:left;
}

table.stationList {
	border:3px solid #2E3959;
	border-radius: 12px;
	padding: 4px;
	!border-spacing: 5px;
	empty-cells: show;
	border-collapse: separate;
    width: 100%;
}
td.station_name {
	text-align: center;
	!padding: 0px 12px; 
	color: #2E3959;
	font-weight: 700;
	!width: 8em;
	height: 30px;
	white-space: nowrap;
    overflow:hidden;
}
td.station_time {
	text-align: center;
}
table.stationList td {
	margin-bottom: 1px;
}
table.stationList td.station_name {
	text-transform: none;
}
tr.even {
	background-color: #DDD;
}
td.stationStatus {
        align: center;
	color: white;
	background-color: #7D1921;
	padding: 0px 12px;
	width: 8em;
	border-bottom: 2px solid white;
}
td.stationStatus.station_on {
	background-color: #32A620;
}
td.stationStatus.station_off {
	background-color: #7D1921;
}
td.stationStatus.station_ban {
	background-color: #FF0000;
}
td.stationStatus.station_whitedot {
	background-image: radial-gradient(white, 1px, transparent 0); /* Dot color, dot size, transparent space */
	background-size: 10px 10px; /* Adjust size of dots and spacing */
	background-repeat: repeat; /* or repeat-x, repeat-y, no-repeat */
}
td.stationStatus.station_waiting {
	background-color: #397F19;
}
td.stationStatus.station_disabled {
	background-color: #AAA;
}
td.stationStatus.station_fault {
	background-color: #D5222E;
}

td.stationOn.dayOn {
	background-color: #32A620;
	text-align:center;
	color:white;
	border-radius: 6px;
	background-image: url('checkmark.png');
	background-position: center center;
	background-repeat: no-repeat;
}
td.stationOn {
	background-color: #F7F1CD;
	border-radius: 8px;
}
td.stationFault {
	background-color: #FF3737;
	border-radius: 8px;
}
td.dayOn {
	background-color: #F7F1CD;
	border-radius: 8px;
}


table.logList {
	padding: 4px;
	margin: 1em 0em;
}
table.logList td {
	padding: 0px 12px;
}
table.logList th {
	padding: 0px 12px;
	border-bottom: 2px solid #2E3959;
}

/******** Interval Selector Styles **********/

.animatedSelector {
	font-size: 26px;
	text-align:center;
	width: 500px;
}
.intervalSelect {
	line-height: 60px;
	border-radius: var(--ir-font-size-sm);
	padding: 3px;	
	cursor: pointer;
}
.intervalSelect.distance0 {
	background-color: #32A620;
	color: white;
}
.intervalSelect:hover {
	border: 2px solid #32A620;
}	
.intervalSelect.distance1 {
}
.intervalSelect.distance2 {
}


/******** Collapsible Styles **********/
.collapsible h4 {
	color:white;
	background-color: #2E3959;
	background-repeat: no-repeat;
	background-position: 3px center;
	padding: 4px 4px 4px 24px;
	margin: 3px 0px 0px 0px;
}
.collapsible.collapsed h4 {
	background-image:url(collapsed.png)
}
.collapsible.expanded h4 {
	background-image:url(expanded.png)
}

.collapsible.collapsed div {
	display:none;
}
.collapsible.expanded div {
	border-right: 3px solid #2E3959;
	border-left: 3px solid #2E3959;
}
.collapsible.expanded div:last-child {
    border-bottom: 3px solid #2E3959;
}
.option {
	margin: 0px;
	padding: 6px 0px;
	clear:both;
}



/******** Schedule graph Styles **********/

td.stationSchedule {
	padding: 0px;
}
.scheduleMarkerContainer {
	margin:0px;
	padding:0px;
	height:28px;
	position:relative;
}
.scheduleMarker {
	position:absolute;
	top: 0px;
	height:28px;
}
.nowMarker {
	position:absolute;
	top: 0px;
	background-color: #7D1921;
	height:28px;
}
.nowMarker.on {
	background-color: #397F19;	
}
.scheduleMarker .markerDetail {
	display:none;
}
.scheduleTick {
	position: relative;
	font-size: 9px;
	text-align:center;
	color: #2E3959;
	border-right:1px solid #2E3959;
}
.scheduleTick:last-child {
	border-right: none;
}

.program0 {background-color: hsl(50,80%,40%)}
.program1 {background-color: hsl(150,80%,40%)}
.program2 {background-color: hsl(225,80%,40%)}
.program3 {background-color: hsl(75,80%,40%)}
.program4 {background-color: hsl(175,80%,40%)}
.program5 {background-color: hsl(250,80%,40%)}
.program6 {background-color: hsl(100,80%,40%)}
.program7 {background-color: hsl(200,80%,40%)}
.program8 {background-color: hsl(275,80%,40%)}
.program9 {background-color: hsl(125,80%,40%)}
.programManual {background-color: hsl(25,80%,40%)}
.schedule {
	background-image:url("whitestripes.png");
}

.showDetails {
	position: absolute;
	width: 90px;
	top: 100%;
	left:0px;
	color:white;
	z-index:100;
	border-radius: 6px;
	display: inline-block;
	font-size: 10pt;
	margin: 3px;
	padding: 3px;
}

.scheduleMarker.showDetails {
	border: 1px solid black;
}

#displayScheduleDate {
	text-transform:none;	
}

#legend span {
	padding:2px 6px;
	color:white;
	margin: 0px 4px;
	font-size:9pt;
}

#pluginLinks
{
    list-style-type: none;
    padding:0;
}

#pluginMgr
{
   background-color:#397F19;
   font-weight: 700;
}

#browsePlugins
{
   background-color:#397F19;
   /*font-weight: 700;*/
   margin-left: 50px;
}

#writePlugins
{
   background-color:#397F19;
   /*font-weight: 700;*/
   margin-left: 50px;
}

#pluginMenu
{
    border:3px solid #2E3959;
	border-radius: 12px;
	padding: 4px;
	border-spacing: 0px;
    background-color: white;
}

@media only screen and (max-width: 1024px) {
   body {
      font-size: 10pt;
   }

   div.panel {
      margin-left: 0;
   }
   div.panel div.title {
      font-size: var(--ir-font-size-md);
   }
/*
   div.header div.title {
	  font-size: 16pt;
   }
   div#status {
      float: none;
      width: 100%;
      padding: 0;
      display: inline-block;
   }
   #deviceTime {
      float: left;
   }
   #deviceTime span.time {
      font-size: 22pt;
      width: 120px;
      letter-spacing:0px;
      padding-right:2px;
      margin-bottom: 4px;
   }
   #deviceTime span.sep {
      font-size: 16pt;
   }
   #deviceTime span.second, #deviceTime span.ampm {
      font-size: 10pt;
   }
   #deviceTime span.second {
      top: -5px;
      left: auto;
   }
   #deviceTime span.ampm {
      left: -55px;
   }
   #deviceDate {
      float: right;
      padding: 0 5px 5px 5px;
   }
*/
   button {
      font-size: 9pt;
   }

   #nav button {
      padding: 4px 12px;
      margin: 4px 0;
      font-size: 9pt;
   }
   #nav button.here {
      height: 40px;
   }

   td.stationStatus {
      padding: 0 6px;
      font-size: 10pt;
   }
   td.station_name {
      font-size: 10pt;
   }

   #programs table tr:nth-child(2).showWeekly td button.weekday {
      -webkit-transform: rotate(-90deg);
      font-size: 8pt;
      !height: 26px;
      !width: 90px;
      height: 27px;
      width: 80px;
      text-align: left;
      margin-bottom:40px;
      margin-top:30px;
      margin-left:-20px;
   }
   .animatedSelector {
      width: 100%;
      max-width: 100%;
   }

   sensorblock {
       border:5px solid #2E3959;
       border-radius: 12px;
       margin: 12px 0px;
   }
   sensorblock p, sensorblock div {
       padding: 2px 24px;
   }

   #flex-sensors {
       display: flex;
       flex-direction: row;
       flex-wrap: wrap;
       justify-content: space-around;
       align-items: flex-end;
   }
}

/* From Janus */
.rounded {
        border-radius: 5px;
}

.centered {
        display: block;
        margin: auto;
}
.fa-2 {
        font-size: 2em !important;
}
.fa-3 {
        font-size: 4em !important;
}
.fa-4 {
        font-size: 7em !important;
}
.fa-5 {
        font-size: 12em !important;
}
.fa-6 {
        font-size: 20em !important;
}

div.no-video-container {
        position: relative;
}

.no-video-icon {
        width: 100%;
        height: 240px;
        text-align: center;
}

.no-video-text {
        text-align: center;
        position: absolute;
        bottom: 0px;
        right: 0px;
        left: 0px;
        font-size: 24px;
}

/* thumbnail support */
.thumbcontainer {
  position: relative;
  margin: 10px;
  width: 150px;
  height: 120px;
  display: inline-block;
}

.thumbimage {
  opacity: 1;
  border-radius: 5px;
  transition: .5s ease;
  position: absolute;
  height: 100%;
  width: 100%;
  object-fit: contain;
  backface-visibility: hidden;
}

.thumbmiddle {
  transition: .5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
}

.thumbcontainer:hover .thumbimage {
  opacity: 0.3;
}

.thumbcontainer:hover .thumbmiddle {
  opacity: 1;
}

.thumbtext {
  background-color: #32A620;
  border-radius: 5px;
  color: white;
  font-size: 16px;
  padding: 8px 16px;
}

.blink-two {
  animation: blinker-two 1.4s linear infinite;
}
@keyframes blinker-two {  
 100% { opacity: 0; }
}

.rounded-image {
  border-radius: 50%;
  border: 4px solid #FFFFFF !important;
  overflow: hidden;
  object-position: center;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
}

/* terra-draw support */
#mode-ui {
    position: absolute;
    /*
    top: 10px;
    right: 10px;
    background: white;
    padding: 10px;
    */
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: row;
}
#mode-ui button {
    margin: 5px 0;
    cursor: pointer;
}

.mode-button {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    background-color: white;
    padding: 2px;
    box-sizing: border-box;
}

.mode-button img {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
}

/* Active state for shape modes */
.mode-button.active {
    /* background-color: #e0e0e0; /* light grey */
    background-color: #A9A9A9; /* dark grey */
}

/* Special buttons default state */
/* #select-mode, */
#clear-mode,
#delete-selected-button,
#undo-button,
#redo-button,
#export-button,
#upload-button,
#resize-button {
    background-color: #000000;
}

/* Special buttons icon default state */
/* #select-mode img, */
#clear-mode img,
#delete-selected-button img,
#undo-button img,
#redo-button img,
#export-button img,
#upload-button img,
#resize-button img {
    filter: brightness(0) invert(1);
}

/* Special buttons active/click states */
/* #select-mode.active { */
/*    background-color: #A9A9A9; /* dark grey */
/*} */

#clear-mode:active,
#delete-selected-button:active,
#undo-button:active,
#redo-button:active,
#export-button:active,
#upload-button:active,
#resize-button.active {
    background-color: #A9A9A9; /* dark grey */
}
