/* --- MOBILE-FIRST DEFAULTS (These apply to all screens, then get overridden by media queries) --- */

body {
    background: #171b20;
    color: #000;
    height: 100%;
    margin: 10px; /* This margin will apply outside the content-container */
}

body, td, th {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 14px;
}

/* Changed: .content-container now defaults to 100% width for mobile */
.content-container {
    width: 100%;
    padding: 0 10px; /* Adds 10px internal padding on left/right for mobile spacing */
    box-sizing: border-box; /* Ensures padding is included in the 100% width */
    margin-left: auto;
    margin-right: auto;
}

#titlearea {
    width: fit-content; /* This can remain fit-content as titles usually don't force wide layouts */
    text-align: left;
    margin: 20px;
}

/* Changed: .tab-container now defaults to 100% width for mobile */
.tab-container {
    border: 1px solid #ccc;
    width: 100%; /* Default for mobile: make it take the full width of its parent */
    box-sizing: border-box; /* Essential for correct width calculation with borders/padding */
}

.tab-headers {
    background-color: #F5F7D4;
    overflow: auto;
}

.tab-button, .nested-tab-button {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 14px;
}

.tab-button:hover, .nested-tab-button:hover {
    background-color: #F3F9A4;
}

.tab-button.active, .nested-tab-button.active {
    background-color: #E4F132;
}

.tab-content, .nested-tab-content {
    display: none;
    padding: 0px;
    border-top: 1px solid #ccc;
}

.tab-content.active, .nested-tab-content.active {
    display: block;
}

.nested-tab-container {
    border: 1px solid #eee;
    margin-top: 10px;
}

.nested-tab-headers {
    background-color: #F5F7D4;
    overflow: auto;
}

/* Ensure the scroll container takes 100% width for mobile */
.table-scroll-container {
    overflow-x: auto; /* This makes the table scroll horizontally */
    width: 100%; /* Make sure it explicitly takes 100% of its constrained parent's width */
    -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
}

/* Table and Cell properties (these remain as desired for both mobile and desktop) */
table {
    width: auto;
    border-collapse: collapse;
    width: 100%; /* This means 100% of its *parent's* width (the scroll container) */
    min-width: max-content; /* This ensures the table will be as wide as its nowrap content */
    /* border-collapse: collapse; (duplicate, can remove) */
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    background-color: white;
    text-align: center;
    white-space: nowrap; /* Keep this for nowrap text, as desired */
}

th {
    background-color: #A9E82C;
}


h1 span {
		color: #ffffff;
		font-size: 20px;
		font-weight: normal;
		margin: 5px 5px 5px 0;
		text-align: left;
	}
/* ... (rest of your existing CSS - fixed-col, better, worse, completed, etc. - no changes) ... */

.control-group {
    display: block; 
    height: fit-content;
    padding: 5px 10px;
    text-align: right;
    margin: 5px;
    margin-top: 1px;
    margin-bottom: 5px;
}

#reset-all {
    background-color: #F5F7D4;
    font-size: inherit;

}


.description {
	font-size: 12px;
	line-height: 18px;
	color: #ffffbe;
	padding: 5px 0 15px 0;
}
a {
  color: inherit; /* Inherit the color from the parent element */
  text-decoration: none; /* Remove the default underline */
}

a:hover {
  text-decoration: underline; /* Show underline on hover */
}

.fixed-col,
td:nth-child(1), /* Target the first data column */
th:nth-child(1) /* Target the first header column */

{
    position: sticky;
    left: 0;
    background-color: white; /* Ensure background covers when scrolling */
    z-index: 2; /* Higher z-index to stay above the scrolling content */
}

.projection {
    background-color: #F5F7D4;
}

.editDiff {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 12px;   
}
  
.popbox {
	position: absolute;
	left:50%;
	top:100%;
	padding:10;
	width: calc(100%-5px);
	layer-background-color:#505555;
	background-color:#FFF;
	z-Index:20;
	height: auto;
	border-width: 6px;
	border-color: #3C3;
	border-style: solid;
	border-radius: 15px;
	font-family: Arial, Helvetica, sans-serif;
}

        /* Style for the header within the preview box */
        .popbox h2 {
            margin-top: 0; /* Often, browsers add top margin to H tags; remove it if you want to control it */
            margin-bottom: 15px; /* Adds space below the header */
            margin-right: 15px; /* Adds space below the header */
            margin-left: 15px; /* Adds space below the header */
            color: #333;
            font-size: 20px; /* Example size */
            line-height: 1.2;
        }

        /* Style for paragraphs within the preview box */
        .popbox p {
            margin-top: 0; /* Often, browsers add top margin to P tags; remove it if you want to control it */
            margin-bottom: 10px; /* Adds space below each paragraph */
            margin-right: 15px; /* Adds space below the header */
            margin-left: 15px; /* Adds space below the header */
            line-height: 1.5; /* Improves readability for text */
            color: #555;
        }


#points_edit_pop th,
#points_edit_pop td {
    border: none;
    border-bottom: 1px solid #ddd;
}



.edit_input {
    border: none;
  outline: none;
    width: 3em;
    font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  border-bottom-style: dotted;
    border-bottom-width: thin;
    border-bottom-color: black;
}

.edit_input:focus {
  box-shadow: 0 0 5px blue;
}

      /* Styles for the close button */
        .preview-close-button {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            line-height: 20px; /* Adjust line height to center 'x' vertically */
        }

        .preview-close-button:hover,
        .preview-close-button:focus {
            color: black;
            text-decoration: none;
            cursor: pointer;
        }


  .better {
    color: darkgreen;
  }
  .worse {
    color: darkred;
  }

.completed {
    background-color: bisque;
}

.projection {
    background-color: #F5F7D4;
}

.editDiff {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 12px;   
}
 

.pos {
 /* font-size: smaller;*/
  color: darkgreen;
}
.neg {
/*  font-size: smaller;*/
  color: darkred;
}

     /* Highlight the clickable TD for demonstration */
        .clickable-td {
            cursor: pointer;
 
        }

/* -------------------------------------------------------------------------------------- */
/* --- DESKTOP-SPECIFIC OVERRIDES using Media Query (min-width: 768px) --- */
/* -------------------------------------------------------------------------------------- */

@media (min-width: 768px) { /* This media query targets screens 768px wide or larger (typical tablet/desktop) */
    body {
        /* You might want to remove body margin or adjust it here for desktop if needed,
           or keep it as is if content-container's margin handles it. */
        margin: 10px; /* Keeping default for now */
    }

    .content-container {
        width: fit-content; /* Desktop: Allow it to fit content's width */
        padding: 0; /* Remove padding if you want fit-content to tightly hug the content on desktop */
    }

    .tab-container {
        width: fit-content; /* Desktop: Allow it to fit content's width */
    }

    /* For desktop, if the screen is wide enough, you might not want an internal scrollbar */
    .table-scroll-container {
        overflow-x: visible; /* Desktop: Allow content to overflow without scrollbar if desired */
        width: auto; /* Allow the container to auto-adjust its width */
    }

    /* You might want to add a max-width to the main content-container for very large screens
       to prevent it from becoming excessively wide, e.g.:
    .content-container {
        max-width: 1200px;
    }
    */
}