/************************************************************************/
/* File:        MAPSStyle.css                                           */
/* Description: Cascading Style Sheet definitions for MAPS              */
/* Author:      Andrew@DeFaria.com                                      */
/* Created:     Mon Nov  3 21:55:05 PST 2003                            */
/* Language:    Cascading Style Sheet                                   */
/*                                                                      */
/* (c) Copyright 2003, Andrew@DeFaria.com, all rights reserved.         */
/************************************************************************/
:root {
  --menu-bg: var(--surface-color);
  --table-data-bg: #2a2a2a;
  --link-hover-color: var(--accent-color);
  --accent-color: var(--google-red);
  --light-google-red: #ffcdd2;
  --input-bg: #1e1e1e;
  /* Dark input background for dark mode */
}

[data-theme="light"] {
  --menu-bg: #dcdcdc;
  --table-data-bg: var(--surface-color);
  --link-hover-color: var(--accent-color);
  --input-bg: white;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 14px;
  margin: 0;
  overflow-y: auto;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  background-color: transparent !important;
  color: var(--accent-color) !important;
}

.heading {
  margin-left: 140px;
  margin-top: 5px;
  padding: 5px;
  padding-top: 20px;
}

#leftbar {
  line-height: 1.5;
  height: auto;
  left: 2px;
  background-color: var(--surface-color);
  color: var(--text-color);
  position: fixed;
  top: 5px;
  width: 135px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  z-index: 100;
}

.username {
  color: var(--accent-color);
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 0.9rem;
  margin-left: 2px;
  margin-bottom: 5px;
  text-align: center;
  width: 125px;
}

.menu {
  font-family: verdana, geneva, arial, helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  line-height: 150%;
  margin: 2px;
  padding: 2px;
  width: 122px;
  margin-bottom: 1em;
}

.intromenu {
  border: 1px solid var(--muted-color);
  font-family: verdana, geneva, arial, helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  line-height: 150%;
  margin: 2px;
  padding: 2px;
  width: 125px;
}

.search {
  font-family: veranda, arial;
  font: bold;
  font-size: 70%;
  margin-left: 2px;
  margin-right: 5px;
  margin-top: 0px;
  /* Added per user request */
  text-align: center;
  width: 125px;
}

.search form {
  margin: 0;
  padding: 0;
}

#highlightrow table tr:hover td {
  /* background: var(--tab-hover-bg); Removed per user request */
  color: var(--accent-color);
}

.quickstats {
  padding-bottom: 0px;
  margin-bottom: 0px;
}

#quickstats {
  background-color: var(--surface-color);
  padding-bottom: 0px;
  margin-bottom: 0px;
}

#quickstats table {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
}

#quickstats tr {
  color: var(--text-color);
}

#quickstats tr:hover {
  background: var(--tab-hover-bg);
  color: var(--accent-color);
}

#quickstats a {
  color: var(--accent-color);
  text-decoration: none;
}

#quickstats td a:hover {
  background: var(--tab-hover-bg);
  color: var(--accent-color);
}

#quickstats tr td:first-child {
  position: relative;
}

#quickstats a:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
  width: 142px;
  /* Removed absolute positioning overlay that breaks clicks? Or kept if needed for hover effect implementation */
}


.heading {
  margin-left: 140px;
  margin-top: 5px;
}

/* Main Headers (Welcome, Spam Elimination, Statistics) - Fancy Font & Red */
.heading h2,
.heading h3,
.header {
  color: var(--accent-color) !important;
  font-family: var(--font-main) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
}

/* General Headings - Red but Normal Font */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--accent-color) !important;
  font-family: var(--font-main) !important;
  font-weight: bold !important;
}

/* Button Styling */
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button,
button,
select,
.nav-button {
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--muted-color);
  padding: 0.2rem;
  font-size: 95%;
  border-radius: var(--radius-md);
  font-weight: normal;
  cursor: pointer;
  font-family: var(--font-main);
  width: auto;
  margin-right: 5px;
  /* Spacing for file inputs */
}

input[type="file"] {
  color: var(--text-color);
}

input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover,
button:hover,
select:hover,
.nav-button:hover {
  background-color: var(--light-google-red);
  color: var(--google-red);
  border-color: var(--google-red);
}

/* Sidebar Specific Overrides */
/* MAPS 3.5 Title */
#leftbar h2 {
  font-family: var(--font-main) !important;
  font-size: 1.2rem !important;
  /* Adjust if needed */
  margin-bottom: 5px;
}

#quickwrap {
  width: 130px;
}

#quickwrap table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #579;
}

#quickwrap td.link a {
  float: left;
  width: 10px;
  margin-left: -60px;
  padding: 0 60px;
  position: relative;
  text-decoration: none;
  color: var(--accent-color);
  font-size: 12px;
  font-weight: bold;
}

#quickwrap td.link a:hover {
  background: var(--tab-hover-bg);
  color: var(--accent-color);
}

#quickwrap table tr:hover td {
  background: var(--tab-hover-bg);
  color: var(--accent-color);
}

.quickstats {
  color: var(--accent-color);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: bold;
  line-height: 10px;
  margin: 2px;
  width: 125px;
  margin-bottom: 0px;
}

.todaysactivity {
  font-size: 0.9rem !important;
  font-weight: bold !important;
  margin-bottom: 2px !important;
}

.quickstats a:link {
  color: var(--google-blue);
  text-decoration: none;
}

.quickstats a:visited {
  color: var(--text-color);
}

.quickstats a:hover {
  color: var(--google-blue);
  background: var(--tab-hover-bg);
}

.toolbar a:hover {
  background: transparent;
}

.toolbar {
  margin-bottom: 8px;
  margin-top: 4px;
}

.content {
  background: var(--bg-color);
  border: none;
  color: var(--text-color);
  font-family: var(--font-main);
  margin-left: 150px;
  padding: 1rem;
  padding-bottom: 6rem;
  width: auto;
}

.msg-table-inner {
  background-color: var(--bg-color);
}

.copyright {
  border-bottom: 1px dotted #ccc;
  border-top: 1px dotted #ccc;
  color: #999;
  font-family: verdana, arial, sans-serif;
  font-size: 10px;
  margin-top: 5px;
  text-align: center;
  width: auto;
}

.label {
  color: #993333;
  font-weight: bold;
  font-size: 14px;
}

#profile .label {
  color: var(--google-red);
}

#profile .notetext {
  color: var(--text-color);
}

#profile select.inputfield {
  width: 25%;
  background-color: var(--input-bg);
  color: var(--text-color);
  transition: background-color 0.2s, color 0.2s;
}

#profile select.inputfield:hover,
#profile select.inputfield:focus {
  background-color: var(--light-google-red);
  color: var(--google-red);
}

#profile select.inputfield option {
  background-color: var(--input-bg);
  color: var(--text-color);
}

#profile select.inputfield:hover option,
#profile select.inputfield:focus option {
  background-color: var(--light-google-red);
  color: var(--google-red);
}

.smalllabel {
  color: var(--text-color);
  font-weight: bold;
  line-height: 12px;
  font-size: 12px;
  text-align: right;
}

.smallnumber {
  color: var(--text-color);
  line-height: 12px;
  font-size: 12px;
  text-align: right;
}

.header {
  color: var(--google-blue);
  line-height: 12px;
  font-weight: bold;
}

.standout {
  color: red;
}

.found {
  color: var(--bg-color);
  background: var(--google-blue);
  font-style: italic;
  font-weight: bold;
}

.error {
  color: red;
  font-style: bold;
}

.dim {
  color: #999999;
}

.dimsmall {
  color: var(--muted-color);
  font-size: 0.9em;
  font-family: Times;
}

.highlite {
  color: var(--google-blue);
  font-weight: bold;
}

.inputfield {
  background: var(--input-bg);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 12px;
  padding: 0.2rem;
  border: 1px solid var(--muted-color);
  border-radius: var(--radius-md);
}

.inputfieldright {
  background: var(--surface-color);
  color: var(--text-color);
  font-family: Veranda, Times;
  font-size: 12px;
  padding-top: 0px;
  padding-bottom: 0px;
  text-align: right;
}

#searchfield {
  font-size: 95%;
  font-weight: normal;
  background: var(--input-bg);
  border: 1px solid var(--muted-color);
  color: var(--text-color);
  width: 90%;
  padding: 0.2rem;
  border-radius: var(--radius-md);
}

.searchfield {
  font-size: 95%;
  font-weight: normal;
  background: var(--input-bg);
  border: 1px solid var(--muted-color);
  color: var(--text-color);
  width: 90%;
  padding: 0.2rem;
  border-radius: var(--radius-md);
  text-align: center;
}



#searchfield:focus {
  background: var(--input-bg);
  color: var(--text-color);
  text-align: left;
}

.note {
  background: #339999;
  color: var(--text-color);
  font-weight: bold;
}

.notetext {
  color: #333;
  font-size: 10px;
  font-weight: italic;
}

.todaysActivity {
  color: yellow;
}

/* Headers */
h1,
h2,
h3 {
  color: var(--text-color);
}

h4 {
  color: var(--google-yellow);
  font-weight: bold;
}

h1 {
  font-size: 18pt;
}

h2 {
  font-size: 14pt;
}

h3 {
  font-size: 10pt;
}

h4 {
  font-size: 8pt;
}

/* Global anchor effects */
a {
  background: transparent;
  text-decoration: none;
}

a:link {
  color: #0080c0;
}

a:visited {
  color: #cc3300;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
  background: transparent;
}

a:active {
  color: #ff0000;
}

img {
  border: none;
}

/* Table colors */
.tableleftend {
  background: var(--menu-bg);
  color: var(--text-color);
  text-align: center;
  border-top-left-radius: 7px;
}

.tablerightend {
  background: var(--menu-bg);
  color: var(--text-color);
  text-align: center;
  border-top-right-radius: 7px;
}

.tablebordertopleft {
  background: var(--menu-bg);
  color: var(--text-color);
  font-style: bold;
  font-size: 14px;
  text-align: center;
  -moz-border-radius-topleft: 7px;
  border-top-left-radius: 7px;
}

.tablebordertopright {
  background: var(--menu-bg);
  color: var(--text-color);
  font-style: bold;
  font-size: 14px;
  text-align: center;
  -moz-border-radius-topright: 7px;
  border-top-right-radius: 7px;
}

.tableborderbottomleft {
  background: var(--menu-bg);
  color: var(--text-color);
  font-style: bold;
  font-size: 14px;
  text-align: center;
  -moz-border-radius-bottomleft: 7px;
  border-bottom-left-radius: 7px;
}

.tableborderbottomright {
  background: var(--menu-bg);
  color: var(--text-color);
  font-style: bold;
  font-size: 14px;
  text-align: center;
  -moz-border-radius-bottomright: 7px;
  border-bottom-right-radius: 7px;
}

.tableborder {
  background: var(--menu-bg);
  color: var(--text-color);
  font-style: bold;
  font-size: 14px;
  text-align: center;
}

.tablebordertopleft a:hover {
  background: transparent;
}

.tablebordertopright a:hover {
  background: transparent;
}

.tableborderbottomleft a:hover {
  background: transparent;
}

.tableborderbottomright a:hover {
  background: transparent;
}

.tablelabel {
  background: var(--surface-color);
  text-align: right;
  font-family: arial, sans-serif;
  font-size: 10px;
  font-weight: bold;
  -moz-border-radius: 7px;
  border-radius: 7px;
}

.tableheader {
  background: var(--menu-bg);
  color: var(--text-color);
  text-align: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: bold;
  border-bottom: 2px solid var(--menu-bg);
}

.msgtable {
  background: #d4d0c8;
}

.msgnbr {
  font-size: 8px;
  text-align: center;
}

.tableleftdata {
  background: var(--menu-bg);
  color: var(--text-color);
  border-left: 3px solid var(--menu-bg);
  border-bottom: 1px dotted var(--muted-color);
  font-size: 12px;
}

.tableleftrightdata {
  background: var(--table-data-bg);
  border-right: solid 3px var(--menu-bg);
  border-left: solid 1px var(--menu-bg);
  border-bottom: 1px dotted var(--muted-color);
  font-size: 12px;
}

.tablerightleftdata {
  background: var(--menu-bg);
  border-right: solid 1px var(--menu-bg);
  border-left: solid 3px var(--menu-bg);
  border-bottom: 1px dotted var(--muted-color);
  font-size: 12px;
}

.tablerightdata {
  background: var(--table-data-bg);
  border-right: 3px solid var(--menu-bg);
  border-left: 1px dotted var(--muted-color);
  border-bottom: 1px dotted var(--muted-color);
  font-size: 14px;
}

.tablebottomleft {
  background: var(--menu-bg);
  color: var(--text-color);
  border-left: solid 3px var(--menu-bg);
  border-right: 1px dotted #ccc;
  border-bottom: solid 3px var(--menu-bg);
  font-size: 12px;
  -moz-border-radius-bottomleft: 7px;
  border-bottom-left-radius: 7px;
}

.tablebottomright {
  background: var(--surface-color);
  border-right: solid 3px var(--menu-bg);
  border-left: 1px dotted var(--muted-color);
  border-bottom: solid 3px var(--menu-bg);
  font-size: 14px;
  -moz-border-radius-bottomright: 7px;
  border-bottom-right-radius: 7px;
}

.tablebottomdata {
  background: var(--table-data-bg);
  border-left: 1px dotted var(--muted-color);
  border-bottom: solid 3px var(--menu-bg);
  font-size: 14px;
}

.tablebottomlefttotal {
  background: var(--menu-bg);
  border-left: solid 3px var(--menu-bg);
  border-bottom: solid 3px var(--menu-bg);
  border-right: 1px dotted var(--muted-color);
  font-size: 14px;
  -moz-border-radius-bottomleft: 7px;
  border-bottom-left-radius: 7px;
}

.tablebottomrighttotal {
  background: var(--menu-bg);
  border-right: solid 3px var(--menu-bg);
  border-bottom: solid 3px var(--menu-bg);
  font-size: 14px;
  -moz-border-radius-bottomright: 7px;
  border-bottom-right-radius: 7px;
}

.tablebottomtotal {
  background: var(--menu-bg);
  border-bottom: solid 3px var(--menu-bg);
  border-top: solid 1px var(--menu-bg);
  border-right: 1px dotted var(--muted-color);
  font-size: 14px;
}

.tabledata {
  background: var(--table-data-bg);
  border-left: 1px dotted var(--muted-color);
  border-bottom: 1px dotted var(--muted-color);
  border-top: 1px dotted var(--muted-color);
  font-size: 14px;
}

.date {
  background: White;
  font-size: 12px;
}

.dateright {
  background: var(--surface-color);
  font-size: 10px;
  border-right: solid 3px var(--menu-bg);
  border-left: 1px dotted var(--muted-color);
  border-bottom: 1px dotted var(--muted-color);
}

/* Special anchor effects */
.sender {
  background: var(--surface-color);
  border-top: 1px dotted #ccc;
  border-left: 1px dotted #ccc;
  font-family: arial, sans-serif;
  font-size: 14px;
}

.sender a:link {
  color: var(--google-blue);
}

.sender a:hover {
  color: var(--link-hover-color);
  background: var(--bg-color);
}

.senderbottom {
  background: var(--surface-color);
  border-top: 1px dotted #ccc;
  border-left: 1px dotted #ccc;
  border-bottom: solid 3px var(--menu-bg);
  font-size: 14px;
}

.senderbottom a:link {
  color: var(--google-blue);
}

.senderbottom a:hover {
  color: var(--link-hover-color);
  background: var(--bg-color);
}

.subject {
  background: var(--surface-color);
  border-top: 1px dotted #ccc;
  border-left: 1px dotted #ccc;
  font-family: arial, sans-serif;
  font-size: 16px;
}

.subject a:link {
  color: #b11;
}

.subject a:visited {
  color: grey;
}

.subject a:hover {
  color: blue;
  background: var(--bg-color);
}

.subjectbottom {
  background: var(--surface-color);
  border-top: 1px dotted #ccc;
  border-left: 1px dotted #ccc;
  border-bottom: solid 3px var(--menu-bg);
  font-size: 16px;
}

.subjectbottom a:link {
  color: #b11;
}

.subjectbottom a:visited {
  color: grey;
}

.subjectbottom a:hover {
  color: blue;
  background: var(--bg-color);
}

/* Menu anchors */
.menu {
  font-weight: bold;
}

.menu a:link {
  color: var(--text-color);
  text-decoration: none;
}

.menu a:visited {
  color: var(--text-color);
}

.menu a:hover {
  color: var(--link-hover-color);
  background: none;
}

.menu a:active {
  color: Yellow;
}

/* Intro menu anchors */
.intromenu {
  font-weight: bold;
}

.intromenu a:link {
  color: Red;
}

.intromenu a:visited {
  color: var(--text-color);
}

.intromenu a:hover {
  color: var(--text-color);
  background: Red;
}

.intromenu a:active {
  color: Yellow;
}

/* Login Table Style for index.php */
.login-table {
  width: 40%;
  margin: 1rem auto;
  border-collapse: collapse;
  border: none;
  background-color: var(--surface-color);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.login-table td {
  padding: 0.5rem;
}

/* Detail.cgi specific overrides */
#detail .tablerightdata,
#detail .tablebottomright {
  font-size: 0.8rem !important;
  background: var(--table-data-bg) !important;
}

#detail span.date {
  background: transparent !important;
  font-size: 0.8rem !important;
  color: var(--text-color) !important;
}

#detail .subject a,
#detail .subjectbottom a {
  color: var(--google-yellow) !important;
}

.maps-button {
  background: transparent !important;
  color: var(--text-color) !important;
  border: 1px solid var(--muted-color);
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.maps-button:hover {
  background: var(--tab-hover-bg) !important;
}

/* Embedded mode overrides - REMOVED per user request to restore menu */

/* Modal Styles */
.modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 2147483647;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  background-color: var(--input-bg);
  /* Adaptive background */
  color: var(--text-color) !important;
  /* Adaptive text color */
  padding: 2rem;
  border: 1px solid var(--muted-color);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border-radius: var(--radius-lg);
  font-family: var(--font-main);
  animation: fadeIn 0.2s ease-out;
}

.modal-btn {
  background-color: var(--google-blue);
  color: white;
  padding: 10px 20px;
  margin-top: 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.modal-btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* List table adjustments for spacing */
div#highlightrow table[name="list"] {
  margin-bottom: 4px;
}

/* Labels */
.label {
  color: var(--google-red);
  font-weight: normal;
}
/* Embedded context fixes (hide redundant footer in iframe) */
.embedded footer.copyright,
.embedded .copyright {
  display: none !important;
}

/* Ensure the main container in embedded mode has space at the bottom */
.embedded .content {
    padding-bottom: 2rem !important;
}
