/* CSS Document */

/* main */

#black_background {
    z-index: 1000;
    display:none;
    background:rgba(1, 1, 1, .9);
    position:fixed;
    width:100%;
    height:100%;
    top: 0;
    left: 0;
    }

main {
    display:flex;
    flex-direction: column;
	flex: 1;
    width: 100%;
}

main h1 {
    font-size: 25px;
    font-family: 'Montserrat';
    color: rgba(255,255,255,.8);
    margin: 0px;
    font-weight: 600;
	text-decoration: none;
}

#page {
    background: rgba(255,255,255,0.3);
    margin: 0px 5%;
    padding: 10px;
    min-height:100%;
    flex:1;
}

#page-header{
    display:flex;
    justify-content: space-between;
}

.ui-menu-item-wrapper {
    background: #ffffff;
    color: rgb(128, 53, 53);
}

.ui-menu-item-wrapper:hover {
    background: rgb(128, 53, 53);
    color: #ffffff;
}

#add-button-wrapper{
    position: absolute;
    right: 5%;
    margin-right:10px;
    display:flex;
    justify-content: center;
    align-items: center;
    background-color:rgba(255,255,255,1);
    border-radius: 25px;
    padding: 5px;
}

#add-button{
    align-self: flex-start;
    display:flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    width: 40px;
    height: 40px;
    font-weight: 600;
    font-family: 'Montserrat';
    color: #7E3333;
}

#add-menu{
    padding: 10px 5px;
    margin: 0px 0px 0px 10px;
    display: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Montserrat';
    color: #000000;
}

#add-menu li{
    display: block;
    cursor: pointer;
}

#add-menu li:not(:first-child) {
    margin-top: 20px;
}

#add-menu li:hover{
    color: #666666;
}

.add-box-wrapper{
    left: 5%;
    top:70px;
    position:fixed;
    width:90%;
    z-index: 1001;
}

.add-box{
    background: rgb(128, 53, 53);
    display: none;
    justify-content: space-between;
    align-items: baseline;
}


.add-box h1{
    margin:15px 5px 15px 15px;
    font-size: 26px;
    font-weight: 600;
    font-family: 'Montserrat';
    color: #ffffff;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.add-box-input{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    margin: 0px 25px;
}

.add-box input[type=text]{
    width: 100%;
    height:100%;
	padding: 8px;
    border: 1px solid #000000;
    font-size: 20px;
}

.add-box input[type=submit]{
    width: 200px;
    height: 40px;
    border: 1px solid #000000;
    background-color: rgba(150,0,0,.5);
    color: #ffffff;
    font-size: 20px;
    margin: 10px 5px;
    cursor:pointer;
}

.add-box input[type=submit]:hover {
    border: 1px solid #a1a1a1;
    background-color: #a1a1a1;
    color: #000000;
    transition: 0.15s ease-in;
}

/* Modal accessibility improvements */
body.modal-open {
    overflow: hidden;
}

/* Disable pointer events on background elements when modal is open */
body.modal-open .sales-items-table,
body.modal-open .sales-notes-summary,
body.modal-open .top-sections,
body.modal-open #edit-page > *:not(.add-box-wrapper) {
    pointer-events: none;
}

body.modal-open #black_background {
    pointer-events: auto;
}

body.modal-open .add-box-wrapper {
    pointer-events: auto;
}

body.modal-open .add-box {
    pointer-events: auto;
}

/* Ensure autocomplete dropdown appears above modal */
.ui-autocomplete {
    z-index: 1002 !important;
    pointer-events: auto !important;
    position: fixed !important;
}

body.modal-open .ui-autocomplete {
    z-index: 1002 !important;
    pointer-events: auto !important;
    position: fixed !important;
}



#autocomplete-message {
    display: none;
    margin:0px;
    color: #ffffff;
}

#edit-page{
    display:flex;
    margin: 30px 0px;
    justify-content: space-between;
}

table {
    font-family: 'Montserrat';
    font-size: 14px;
	margin: 0px;
	padding: 0px;
	border-collapse: collapse;
	border-style: hidden;
}

table th{
    text-align: left;
    padding: 5px;
    color: #ffffff;
    background: rgb(128, 53, 53);
}

table tr{
	border: 2px solid gray;
}

table td{
    margin:0;
    padding:5px;
    background: #ffffff;
	border: 2px solid gray;
}

.list-table td{
    cursor: pointer;
}

.list-table tr:hover td{
    background: #ffa500;
}

.table-row-link{
    display:none;
}

.edit-table-header td input[type=text]{
    width:100%;
    margin: -5px;
	padding: 5px;
    border: none;
}

.edit-table-header td input[type=date]{
	padding: 5px;
    margin: -5px;
    border: none;
}

#edit-page input[type=submit]{
	display: inline-block;
	margin-top: 5px;
    padding: 5px 15px;
    border: 1px solid #000000;
	font-family: 'Montserrat';
    font-size: 14px;
	font-weight: bold;
    color: #ffffff;
    cursor:pointer;
    background-color: rgb(128, 53, 53);
}

#edit-page input[type=submit]:hover {
    border: 1px solid #a1a1a1;
    background-color: #a1a1a1;
    color: #000000;
    transition: 0.15s ease-in;
}



#submit {
    width: 200px;
    height: 42px;
    border: 1px solid #000000;
    background-color: #000000;
    color: #ffffff;
    font-size: 20px;
    margin: 10px 0px;
    cursor:pointer;
}

#submit:hover {
    border: 1px solid #a1a1a1;
    background-color: #a1a1a1;
    color: #000000;
    transition: 0.15s ease-in;
}

.options a {
    color: #006400;
}

.options a:hover {
    color: #000000;
    transition: 0.20s ease-in;
    text-decoration: none;
}

.invalidFeedback {
    color: #ff0000;
    display: block;
}

/* Timestamp update animation */
.timestamp-updated {
    background-color: #d4edda !important;
    color: #155724 !important;
    transition: all 0.3s ease;
}

@media only screen and (max-width: 890px) {
    
    main h1 {
        font-size: 15px;
    }

    .page-header{
        margin: 5px;
    }

    .add-wrapper{
        border-radius: 15px;
    }
    
    .add-button{
        font-size: 25px;
        width: 40px;
        height: 40px;
    }
    
    .add-menu{
        font-size: 12px;
    }

}

/* footer */

footer{
	bottom:0px;
	margin-top: 10px;
	padding:10px 0px;
	width:100%;
	background-color:rgba(150,0,0,1.0);
}

footer p {
	margin:0px;
	padding:0px;
	color: white;
	text-align: center;
}
