/* <main> definition */
@charset "UTF-8";

.debug {
    border: 1px solid fuchsia;
    background-color: khaki;
}
/* this does not work from stylesheet file? */
@media only screen and (max-width: 768px) {
	main,
	nav > div,
	header > div,
	nav.topnav > div,
	.bottomnav > div {
		width: clamp(320px, 100%, 500px); /* Prevent expansion when console is open - min 320px for mobile, max 500px */
		max-width: 500px; /* Maintain max-width even on mobile */
	}
    nav.topnav {
        position: fixed !important;
        top: 40px !important;
        left: auto !important;
        right: calc((100% - var(--body-max-width)) / 2) !important;
        width: 150px !important;
        max-width: 150px !important;
        margin: 0 !important;
        border-radius: 8px 0 0 0 !important;
    }
    @media only screen and (max-width: 500px) {
        nav.topnav {
            right: 0 !important;
        }
    }
    .bottomnav {
        position: fixed !important;
        bottom: 0vh !important;
    }
    .bottomnav {
        height: 60px;
    }
    #navi {
        flex-direction: column;
        align-items: stretch;
        background: white;
        border-radius: 8px 0 0 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        width: 100%;
    }
    #navi a {
        display: block;
        padding: 8px 16px;
        text-decoration: none;
        color: #333;
        border-bottom: 1px solid #eee;
        text-align: right;
        transition: background-color 0.2s;
        line-height: 1.4;
    }
    #navi a:hover {
        background-color: #f8f9fa;
    }
    #navi a:last-child {
        border-bottom: none;
    }
    #navi div {
        font-size: 14px;
        padding: 0;
        margin: 0;
        line-height: inherit;
        display: inline;
    }
    body {
        margin: 0.5em;
    }
    .imgmenu {
        /* the x delete button on uploaded images */
        font-size: 2em;
        right: 0;
        margin-right: 0;
    }
 
}

@media only screen and (max-width: 768px) and (orientation: portrait) {
    input,
    textarea,
    select,
    [contenteditable="true"] {
        font-size: 17px;
    }
}

@media only screen and (max-height: 500px) and (orientation: landscape) {
    :root {
        --body-width: 100%;
        --body-max-width: 100%;
    }
    main,
    nav > div,
    header > div,
    nav.topnav,
    nav.topnav > div,
    .bottomnav > div {
        width: 100%;
        max-width: 100%;
    }
    body {
        margin: 0.5em;
    }
}
@media only screen and (max-width: 430px) and (orientation: portrait) {
    /* More specific mobile styles if needed */
}
/* @media only screen and (min-width: 768px) {
            
        }       */
.box { /* editor, list item when expanded */
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
        rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

/* Removed bold styling for checked items - keeping normal font weight */

/* Keep description flush with the title when expanded */
.box .i-desc {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Make descriptions and comments lighter in color for better visual hierarchy */
.i-desc {
	color: #666;
	font-weight: 400;
	font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	/* Align description with the start of item name text */
	/* Counter is on .item-name::before with font-size 1.1rem and margin-right 0.3rem */
	/* For "2.", approximate width is ~0.7em (digit + period) at 1.1rem scale + margin */
	padding-left: calc(1.1rem * 0.7 + 0.3rem);
}

.comment {
    color: #666;
    font-size: 0.9em;
}

.comment b {
    color: #555;
    font-weight: 600;
}

.comment .datetime.info {
    color: #999;
}
ol li.litem { /* editor, list item when collapsed */
    margin-bottom: 0.15em;
    border-radius: 0.3em;
    padding: 0.15em;
}

input {
    border: 0;
}
.itemCtrl {
    align-self: flex-end;
}
ol {
    list-style: none;
    counter-reset: my-awesome-counter;
    margin-left: 0px;
    padding-left: 0px;
    border: 0px;
}
/* ol li { */
div.item-name {
    counter-increment: my-awesome-counter;
}
/* ol li::before {
         */
div.item-name::before {
    content: counter(my-awesome-counter) ".";
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 0.3rem;

    /* font-family: "Abril Fatface", serif; */
    line-height: 1;
}
.items {
    margin-left: 0;
    padding-left: 0;
}
.sortable-ghost {
    background-color: aqua;
}
.sortable-chosen {
    opacity: 1;
    /* background-color: yellow; */
    background-color: rgb(186, 192, 181);
}
/* have scrollbars on */
body { 
    overflow-y: scroll; 

    font-family: BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-style: normal;
    font-weight: 400;
}
input:focus {
    outline: none;
}


/* editor, item */
input[type='checkbox'].custom-radio {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid darkgray;
    border-radius: 50%;
    outline: none;
    /* box-shadow: 0 0 5px 0px gray inset; */
  }
  
  input[type='checkbox'].custom-radio:before {
    content: '';
    display: block;
    width: 60%;
    height: 60%;
    margin: 20% auto;
    border-radius: 50%;
  }
  
  input[type='checkbox'].custom-radio:checked:before {
    background: rgb(22, 22, 22);
  }
