/* Apply box-sizing to all elements. This tells the browser to treet width and height
   as absolute values and not to adjust element sizes to account for padding.*/
* {
    box-sizing: border-box;
}

body {
    height: 1500px;
	font-family: 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
	background: #f9fafb;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
     background: linear-gradient(#64D2F7, #195172);
    margin:0;
}
#master_panel{
}
.master_panel{
}
hr{
    border-color:lightgrey;
}
/*************** Popup forms *********************/

/* Unified dialog header */
.dialog-header {
    cursor: move;
    padding: 10px;
    background: linear-gradient(135deg, #3E3AF2 0%, #6366f1 100%);
    color: white;
    border-bottom: 1px solid #ccc;
    position: relative;
    width: inherit;
    height: fit-content;
}

.dialog-header h1 {
    margin: 0;
    font-size: 18px;
    padding-right: 30px; /* Space for close button */
}

/* Warning variant (for wallet keys modal) */
.dialog-header.warning {
    background: linear-gradient(135deg, #c00 0%, #e53935 100%);
}

/* Close button in header - centered vertically */
.dialog-close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.dialog-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* The popup form */
.form-popup {
/* Hidden by default. */
  display: none;
/* The position all pop-ups will appear when activated. */
  position: fixed;
  top: 100px;
  right: 50%;
/* Make sure the form opens above the content.*/
  z-index: 102;
/* Border styling. */
  border: 3px solid black;
  border-radius: 30px;
/* Background styling. */
  background-color: #f5f5a745;
  backdrop-filter: blur(6px);
  background-image: linear-gradient(45deg, lightgrey, transparent);
/* Size of the form. Todo should i have height?*/
  width:500px;
}

/* Styles for elements inside the popup.*/
.form-popup #SigName_div, label, h1, select, #Signal_type, span{
    text-align:center;
    height:20px;
    display: inline-table;
}
.form-popup input[type="radio"], .form-popup input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: green;
}

/* Add styles to the form container */
.form-container {
  padding: 10px;
}
/* Define the behavior of text inputs inside the form containers. */
.form-container input[type=text]:focus, .form-container input[type=password]:focus {
  background-color: #ddd;
  outline: none;
}
/* Set a style for the buttons inside form-containers. */
.form-container .btn {
  border: none;
  cursor: pointer;
  margin-bottom:10px;
  opacity: 0.8;
  height:30px;
}
/* Set the style for any select that is a direct descendant of any form container */
form-container > select{
    width: 150px;
    margin-left:60px;
}
/* Some styles for all buttons. */
.btn {
    width: 150px;
    border-radius: 40px;
    margin-left:20px;
    box-shadow: 8px 7px 15px #20202080, -3px -2px 15px #2c2c2c87, inset -1px -3px 6px 1px #0000007a;
    /* margin-top: 5px; */
    border: none;
    font-size: 18px;
    font-weight: bold;
    transition: box-shadow .35s ease !important;
    outline: none;
    font-size: 1.01em;
    background-color: #8dad76;
 }


/* Add a red background color to the cancel button */
.form-container .cancel {
  background-color: #d56868;
}

/* Add some hover effects to buttons */
.btn:hover, .open-button:hover {
    opacity: 1;
    box-shadow: 8px 7px 15px #5d7f8b, -3px -2px 15px #5d7f8b, inset -1px -3px 6px 1px #0a0a0aa6;
    color: blue;
    cursor: pointer;
}

/* The Signal pop_up has three panels inside the dialog. Configures*/
/* the display properties in order to cycle through the panels. */
#panel_1{
  display: grid;
}
#panel_2{
  display: none;
}
#panel_3{
  display: none;
}
/*
    One of the Signal pop_ups has dialog that gets
    substituted out depending on a setting. This Configures
    the display behaviour*/
#subpanel_1{
    /* Hidden by default */
    display:none;
}
#subpanel_2 {
    /* Displayed by default */
    text-align:center;
}
/* Individual styles for this sub-panel. */
#subpanel_1 label{
    display:inline-block;
    width:100px;
    text-align:center;
    margin-left:100px;
}

/* These styles are used in the signal popup */
.padDiv{
    padding:25px;
}
#rangeVal{
    width:50px;
}
#sig_operator{
    padding-left: 30px;
}
/* Styles use in the exchange pop-up*/
#exchange_pan_1{
height: 500px;
}
#api_key{
    height: 20;
    grid-column: 2 / span 3;
    grid-row: 3;
    margin-right: 60;
}
/***************End popup forms *********************/

#app_header{
    border-style: none;
    grid-column: 1/3;
    grid-row:1;
    position: relative;
    z-index: 250;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: 50px;
    padding: 0 16px;
    background-color:#3E3AF2;
}
#app_title{
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align:center;
    width:auto;
    margin:0;
    color:#F5F3AD;
    pointer-events: none;
    white-space: nowrap;
}
#app_header_left_controls,
#app_header_right_controls{
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}
#app_header_left_controls{
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}
#app_header_right_controls{
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

/* Analyze Charts Dropdown */
.analyze-dropdown-container {
    position: relative;
    display: inline-block;
}

.analyze-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.analyze-btn:hover {
    background: linear-gradient(135deg, #5558e8 0%, #7c4ddb 100%);
    transform: translateY(-1px);
}

.analyze-icon {
    font-size: 14px;
}

.analyze-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 200;
    margin-top: 5px;
    overflow: hidden;
}

.analyze-option {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    font-size: 13px;
    transition: all 0.2s ease;
}

.analyze-option:hover {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

.option-icon {
    font-size: 16px;
}

/* Pattern detection cursor overlay */
#pattern_detection_cursor {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    border: 2px solid #6366f1;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: none;
}

/* Pattern detection results popup */
#pattern_results_popup {
    position: fixed;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border: 1px solid #6366f1;
    border-radius: 10px;
    padding: 0;
    min-width: 220px;
    max-width: 300px;
    max-height: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    color: #e0e0e0;
    overflow: hidden;
}

#pattern_results_popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #444;
    background: rgba(99, 102, 241, 0.2);
}

#pattern_results_popup h4 {
    margin: 0;
    color: #6366f1;
    font-size: 14px;
}

#pattern_results_popup .popup-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#pattern_results_popup .popup-close-btn:hover {
    color: #f87171;
}

#pattern_results_list {
    padding: 10px 15px;
    max-height: 280px;
    overflow-y: auto;
}

#pattern_results_popup .popup-footer {
    padding: 8px 15px;
    border-top: 1px solid #444;
    font-size: 10px;
    color: #666;
    text-align: center;
}

.pattern-result-item {
    padding: 6px 0;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pattern-result-item.bullish {
    color: #4ade80;
}

.pattern-result-item.bearish {
    color: #f87171;
}

.pattern-strength {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
}
#login_button{
    width: 100px;
    margin: 10;
    background: #8dad76;
}
#logout_button{
    width: 100px;
    margin: 10;
    background: #d56868;
}
#login_popup{
    font-family: 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    justify-content: space-around;
    justify-items: center;
}
.login_content{
    display: grid;
    justify-items: center;
}
.logon_active{
    display:grid;
}
.input-field .validate {
    border: none;
    margin-bottom: 15px;
    color: #bfc0c0;
    background: #246486;
    padding: 20px;
    font-size: 16px;
    border-radius: 10px;
    box-shadow: inset 5px 5px 5px #232323,
    inset -5px -5px 5px #292929;
    outline: none;
}
.second-button {
    margin-top: 20px;
    padding: 20px 30px;
    border-radius: 40px;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    background: #262626;
    box-shadow:  8px 8px 15px #202020,
                 -8px -8px 15px #2c2c2c;
    transition: box-shadow .35s ease !important;
    outline: none;
}

.second-button:active{
    background: linear-gradient(145deg,#222222, #292929);
    box-shadow: 5px 5px 10px #262626, -5px -5px 10px #262626;
    border: none;
    outline: none;
}
.second-button:hover{
     box-shadow:  5px 5px 15px #3e3af2,
             -5px -5px 15px #64d2f7;
     color: #64d2f7;
     cursor: pointer;
}
.form-popup .close-btn {
    border-color: black;
    border-style: solid;
    border-radius: 50%;
    background: #9f180f;
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    font-size: larger;
    height: 30px;
    box-shadow: 5px 5px 15px #1e1e1e,
    -5px -5px 15px #1e1e1e;
    text-align: center;
    color: white;
 }
.form-popup .close-btn:hover {
     box-shadow:  5px 5px 15px #9f180f,
             -5px -5px 15px #9f180f;
     color: red;
     cursor: pointer;
}
#sign_up_body{
    background-attachment: fixed;
}
#signup_content{
    display: grid;
    justify-content: center;
}
#exc_status_div{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 3fr;
}
#exStatusBtn{
    height: 30;
    margin-left: 0;
    margin-top: 10px;
    font-weight: bold;
    grid-column: 1/3;
    font-size: 1.01em;
}

#exc_status{
    grid-column: 1/3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    }
.conned_excs{
    margin-left: 15px;
    width: 110px;
    margin-top: 15px;
    height: 80px;
    overflow: scroll;
    scrollbar-width: none;
}
/***********************Three Charts ************************/

/* This class if for a child element of indicator_output created in general.js */
.legend {
	width: 150px;
	padding: 1px;
	font-size: 14px;
	background-color: rgba(255, 255, 255, 0.23);
	text-align: left;
	pointer-events: none;
}
.a1{
    position: absolute;
    z-index:98;
    width: 200px;
    padding: 15px;
    border-style:none;
}
#indicator_output{
    color: blueviolet;
    position: absolute;
    height: fit-content;
    width: 150px;
    margin-top: 30px;
    border-radius: 8px;
    background-image: linear-gradient(93deg, #ffffffde, #fffefe29);
}

#chart_controls{
    border-style:none;
    width: 600px;
    padding: 15px;
    display: grid;
    grid-template-columns: 4fr 2fr 2fr 2fr;
    margin-left: 250;
}
#indicators{
    display: none;
    position: absolute;
    left: 100px; top: 50px;
    width: 160px;
    padding: 12px;
    background: linear-gradient(135deg, #3E3AF2 0%, #6366f1 100%);
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
    color: white;
    z-index: 150;  /* Above formation overlay (z-index: 100) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#indicators label {
    color: white;
    margin-left: 5px;
}

#indicators input[type="submit"] {
    margin-top: 10px;
    width: 100%;
    padding: 6px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-size: 12px;
}

#indicators input[type="submit"]:hover {
    background: rgba(255,255,255,0.3);
}
#enable_indicators{
    height:20px;
}

#chart{
    grid-column: 1;
    grid-row:2;
}


#chart2{
    grid-column: 1;
    grid-row:3;
}
#chart3{
    grid-column: 1;
    grid-row:4;
}
#chart4{
    grid-column: 1;
    grid-row:5;
}
#chart5{
    grid-column: 1;
    grid-row:6;
}
/***************************************************/

/****************Right Panel***********************/
.collapsible {
  background-color: #3E3AF2;
  color: white;
  cursor: pointer;
  padding: 5px;
  width: 100%;
  border: none;
  text-align: center;
  outline: none;
  font-size: 15px;
}

.collapsible.active, .collapsible:hover {
  background-color: #0A07DF;
}

.collapsible:after {
  content: '\002B';
  color: white;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212";
}

.content {
  padding: 5px 18px;
  max-height: 60px; /* Preview height when minimized - shows key buttons/info */
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: #f1f1f1;
}

/* When panel is expanded */
.collapsible.active + .content {
  overflow-y: auto;
  max-height: 400px; /* Expanded height */
}

/* Hide scrollbar by default, show on hover */
.content::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.content:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
}

.content:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Firefox scrollbar hiding */
.content {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.content:hover {
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}
.bg_red{
    background-color:#9F180F;
}
.bg_blue{
    background-color:#3E3AF2;
}


#right_panel{
    grid-column: 2;
    grid-row:2/5;
}
#bal_content{
    display:grid;
    grid-template-columns:1fr 1fr;
    min-height: 100px;
}
#balances{
    width:250px;
    height:50px;
    grid-row:2;
    grid-column:1;
    overflow: hidden;
    position:relative;
    bottom:20;
    left:5px;
}
#balances_tbl{
position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: -17px; /* Increase/Decrease this value for cross-browser compatibility */
    overflow-y: scroll;
}
#alerts_content{
    overflow: scroll;
}
#signal_content, #strats_content, #strat_opt{
    overflow: scroll;
}
#trade_content{
  overflow: scroll;
}
.new_btn{
margin:5;

}
/*******************Trade Panel***************************/
#price{
    height:20px;
    display:none;
}
#current_price{
    height:20px;
    display:inline-block;
}

#price-label{
    height:20px;
}
#quantity{
    height:20px;
}
.trade_details{
    height: 25px;
    width: 25px;
    background-image: url("./trade_icon.png");
    background-size: cover;
    border: none;
}
.trade_details {
transition: 1s ease;
cursor:pointer;
}

.trade_details:hover {
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
transition: 1s ease;
}
.trade_cont{
    display: grid;
    grid-template-columns:40px 1fr 1fr 1fr 35px;
    width: 300px;
}
.trade_cont span{
    text-align: left;
}
#activeTradesLst{
    list-style-type: none;
}
.details{
    text-align: left;
    margin-left: 11px;
}
.d_lbl{
    font-weight: bold;
    text-align: right;
}
/***************************************************/
/************Edit/Add Indicators Panel**************/
.section {
    min-height: 20px;
}

.btn {
    height: 30px;
    /* margin-top: 10px; */
    margin-left: 0;
}

.section h3 {
    text-align: center;
}
#indicator_panel{
    overflow-y: scroll;
    min-height: 75px;
}
#edit_indcr_panel{
    padding: 3px;
}

.ierow{
}
#edit_indctr_controls{
    height:25px;
    width: 75px;
    display: flex;
    justify-content: center;
    align-items: center;

}
.e_btn{
    height:25px;
    width:25;
    font-weight: bold;
    color:darkred;
    background-color:EEC9C9;
}
.iename{
    text-align:center;
    width: 150px; height: 32px;
    font-weight: bold;
    overflow: hidden;
    display: flex; justify-content: center; align-items: center;
}
#ieprop_container{
    margin-left:20px;
    grid-column: 3/11;
    text-align:right;


}
.ieprop{
    width: 150px;
    height: 45px;
    overflow: hidden;
    display: inline-block;
    margin-bottom:15px;
}
.ietextbox{
    width: 100px;
    height: 25px;
}
.ie_value{
    width: 75px;
    height: 25px;
    border: 0;
    outline:0;
    background: transparent;
    font-weight: inherit;
    font-size:inherit;
    line-height:inherit;
    color:inherit;
}
input[type=checkbox] {
            vertical-align: middle;
            position: relative;
            bottom: 1px;
        }
#create_indcr_container{
}
/*******************************************************************/

/* exchange panel */
.name-row {
    background-color: #3E3AF2;
    color: white;
    padding-left: 8px;
}
