/* Modal CSS for trade modal */
body.modal-open {
  overflow-y: hidden;
  position: relative;
}

.trade-modal {
    position: fixed;
    width: 100%;
    max-height: 100vh;
    overflow-x: visible;
    background: white;
    right: -100%;
    left: auto;
    overflow-y: auto;
    top: 50%;
    box-shadow: 0px 30.7947px 30.7947px rgba(0, 0, 0, 0.08);
    z-index: 320; 
    -ms-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
    transition: all 0.2s linear;
}

.border-top-xs-only {
    border-top: 1px solid #dee2e6!important;
}

/* Modal-specific rules */
.trade-modal .wdt-emoji-picker,
#analysis-field-wrapper {
    display: none;
}

.trade-modal.open {
    right: 0px;
}

.trade-modal #close-trade {
    display: block !important;
}

body:not(.modal-open) #close-trade {
    display: none !important;
}

.limit-exceeded-warning {
    display: none;
}

.input-group-currency {
  position: relative;
}

.input-group-currency .pair-icon {
    position: absolute;
    top: 50%;
    left: 0.4rem;
    width: 1.625rem;
    transform: translateY(-50%);
}  

.input-group-currency .input-tooltip {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    width: 2.4rem;
    transform: translateY(-50%);
} 

.input-group-currency .input-inner-label {
    position: absolute;
    top: 50%;
    right: 1rem;
    color: #9696bb;
    font-weight: 500;
    width: 4rem;
    text-align: right;
    transform: translateY(-50%);
}

.input-group-currency .input-tooltip .small {
  top: -0.0625rem;
  position: relative;
}

.h2-sm { 
  font-size: 1.2rem;
}

.input-group-currency .form-control {
    border: 1px solid #F0F0EF;
    box-sizing: border-box;
    border-radius: 1.3125rem;
    background: #fff;
    padding: .5rem .75rem .5rem 2.5rem;
}
.input-group-currency .form-control[readonly] {
    background: #e9ecef;
}

#leverage-options .btn-outline-secondary {
    width: 3rem;
    border-radius: 0.5rem;
}

#leverage-options .btn-outline-secondary:not(:disabled):not(.disabled).active, 
#leverage-options .btn-outline-secondary:not(:disabled):not(.disabled):active, 
#leverage-options .show>.btn-outline-secondary.dropdown-toggle {
    color: #fff;
    background-color: #545490;
    border-color: #545490;
}

#leverage-options .btn-outline-secondary {
    color: #000000;
    background-color: transparent;
    background-image: none;
    border-color: #9696bb;
}

.trade-description-holder {
  background: #FFFFFF;
  border: 1px solid #F0F0EF;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 1rem;
  position: relative;
} 

.trade-description-holder textarea {
    width: 100%;
    background: transparent;
    border: 0px;
    padding: 0;
}

.trade-description-holder  textarea:focus {
    outline-offset: 0px;
    outline: 0px;
}

.trade-description-options {
    font-size: 1.2rem;
}

/* buttons */

/* Enhanced Order Type Button Styles */
.btn-order-option {
    border-radius: 6px;
    border: 1px solid #e9ecef;
    color: #6c757d;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    font-weight: 500;
    margin-right: 4px;
}

.btn-order-option:hover {
    color: #495057;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.btn-order-option.active {
    color: white !important;
    background-color: #545490 !important;
    border-color: #545490 !important;
    box-shadow: 0 2px 8px rgba(84, 84, 144, 0.2);
}

.btn-order-option.active:hover {
    background-color: #4a4a82 !important;
    border-color: #4a4a82 !important;
}

.btn-order-option.focus,
.btn-order-option:focus {
    box-shadow: 0 0 0 0.2rem rgba(84, 84, 144, 0.25);
    outline: 0;
}

/* Enhanced Buy/Sell Button Styles */
.btn-order-action-type {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 8px !important;
    border: 2px solid #dddde9;
    background-color: #f8f9fa;
    color: #6c757d;
}

.btn-order-action-type:hover {
    border-color: #545490;
    background-color: #f1f3f4;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-order-action-type.active {
    background-color: #545490 !important;
    border-color: #545490 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(84, 84, 144, 0.3);
}

.btn-order-action-type.active:hover {
    background-color: #4a4a82 !important;
    border-color: #4a4a82 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(84, 84, 144, 0.4);
}

/* Buy button specific styling */
.btn-order-action-type input[value="buy"] ~ * {
    /* Additional buy-specific styles can go here */
}

.btn-order-action-type:has(input[value="buy"]).active {
    background-color: #17C671 !important;
    border-color: #17C671 !important;
    box-shadow: 0 4px 12px rgba(23, 198, 113, 0.3);
}

.btn-order-action-type:has(input[value="buy"]).active:hover {
    background-color: #15b866 !important;
    border-color: #15b866 !important;
    box-shadow: 0 6px 16px rgba(23, 198, 113, 0.4);
}

/* Sell button specific styling */
.btn-order-action-type:has(input[value="sell"]).active {
    background-color: #EB5757 !important;
    border-color: #EB5757 !important;
    box-shadow: 0 4px 12px rgba(235, 87, 87, 0.3);
}

.btn-order-action-type:has(input[value="sell"]).active:hover {
    background-color: #e74c3c !important;
    border-color: #e74c3c !important;
    box-shadow: 0 6px 16px rgba(235, 87, 87, 0.4);
}

/* Trade Type Display Enhancement */
.trade-type {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Submit Button Enhancement */
#post-trade {
    transition: all 0.3s ease;
}

#post-trade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

#post-trade:active {
    transform: translateY(0);
}

/* Visual feedback for form state changes */
.trade-form-updating {
    opacity: 0.7;
    pointer-events: none;
}

.trade-form-updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Transition effects for buttons */
.btn-order-option.transitioning {
    transform: scale(0.95);
    opacity: 0.8;
}

.btn-order-action-type.just-activated {
    animation: activateButton 0.3s ease-out;
}

@keyframes activateButton {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(84, 84, 144, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(84, 84, 144, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(84, 84, 144, 0);
    }
}

/* Buy button activation animation */
.btn-order-action-type:has(input[value="buy"]).just-activated {
    animation: activateBuyButton 0.3s ease-out;
}

@keyframes activateBuyButton {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(23, 198, 113, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(23, 198, 113, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(23, 198, 113, 0);
    }
}

/* Sell button activation animation */
.btn-order-action-type:has(input[value="sell"]).just-activated {
    animation: activateSellButton 0.3s ease-out;
}

@keyframes activateSellButton {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(235, 87, 87, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(235, 87, 87, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(235, 87, 87, 0);
    }
}

/* Enhanced button group styling */
.btn-group .btn-order-action-type:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.btn-group .btn-order-action-type:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}


/* Loading state for trade submission */
.trade-submitting {
    position: relative;
    pointer-events: none;
}

.trade-submitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.trade-sub-block { 
  background:#F5F5FA;
  border-radius: 8px;
}

.tradingview-preview .tradingview-widget {
    padding-top: 10px;
}

.youtube-preview,
.tradingview-preview,
.image-upload {
    position: static;
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    border-radius: 5px;
    padding: 15px 15px 15px 15px;
    line-height: 1.4;
    text-align: left;
    background-color: rgba(0,0,0,.05);
} 

.image-preview img {
  border-radius: 3px;
  overflow: hidden;
}

.link-preview {
    position: static;
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    border-radius: 5px;
    padding: 15px 15px 15px 15px;
    line-height: 1.4;
    text-align: left;
    background-color: rgba(0,0,0,.05);
}

.trade-img-preview {
    height: 15rem;
    border-radius: 5px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.full-preview-block {
    position: relative;
}

button#delete-analysis-image {
    position: absolute;
    z-index: 2;
    right: 1rem;
    top: 1rem;
}



.link-meta-info.link-meta-preview {
    position: static;
    display: block;
    max-width: 100%;
    padding: 70px 0px 0px 146px;
    overflow: hidden;
    font-size: 13px;
  
    line-height: 1.4;
    text-align: left;
}

.link-meta-info.link-meta-preview.loaded {
    padding: 15px 0px 0px 146px;
}

.link-meta-info.link-meta-preview.failed {
    padding: 15px 0px 0px 0px;
}
 
.link-meta-info.empty {
    padding: 0px 0px 0px 0px;
} 
 
.link-meta-info .link-thumbnail {
    float: left;
    margin-left: -145px;
}

.link-meta-info .link-thumbnail img {
    max-width: 130px;
    border-radius: 5px;
}
.link-meta-info h6 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.link-meta-info small {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}


.icon-tv-white {display: none;}
label.active .icon-tv-white {    display: inline-block;}
label.active .icon-tv {display: none;}  

label:hover .icon-tv-white {    display: inline-block;}
label:hover .icon-tv {display: none;}  

.spinner-holder {
    position: relative;
    display: block;
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

.introjs-arrow.top {
    top: -10px;
    border-bottom-color: #fff;
    display: block !important;
}

table .btn-sm {
    padding: 0.2rem 0.875rem;
}


.progress {
    box-shadow: 0 0 0;
}

.progress-bar {
    background-color: #62366a;
}

.custom-control-input {
    opacity: 0;
}

@media all and (max-width: 413px){

  .introjs-tooltip.first-step.introjs-floating {
    margin-top: 60px !important;
  }

  .introjs-arrow.top {
    display: block !important;
    left: 130px;
  }

}

#quick-pct-change {
  font-size: 1.2rem;
} 

@media (min-width: 576px) {

  .border-top-xs-only {
    border-top: 0px solid #dee2e6!important;
  }

  #quick-pct-change {
    font-size: 2rem;
  }

  .h2-sm {
  font-size: 1rem;
  }

  .trade-modal {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
  
  }

}

@media (min-width: 768px) {

}

@media (min-width: 992px) {

  .trade-modal {
    width: 37.5rem;
    right: -37.5rem;
  }

  .trade-modal.open {
    right: 0px;
    left: auto;
  }

} 

@media (min-width: 1200px) {

}

/* Market select dropdown styling */
.market-select:not(#quick-pct-change) {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.market-select:not(#quick-pct-change):hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.market-select:not(#quick-pct-change):active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.market-select h6 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-select:not(#quick-pct-change) .iconify {
    transition: transform 0.2s ease;
}

.market-select:not(#quick-pct-change):hover .iconify {
    transform: translateY(1px);
}

/* Make the entire market select area clickable */
.market-select:not(#quick-pct-change) * {
    pointer-events: none;
}

.market-select:not(#quick-pct-change) {
    pointer-events: auto;
}

/* Crypto selection buttons styling */
.btn-market {
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid transparent;
    background-color: #f8f9fa;
    margin-bottom: 8px;
}

.btn-market:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #dee2e6;
}

.btn-market:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-market.active {
    background-color: #545490;
    color: white;
    border-color: #545490;
    box-shadow: 0 2px 8px rgba(84, 84, 144, 0.3);
}

.btn-market.active:hover {
    background-color: #4a4a82;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(84, 84, 144, 0.4);
}

.btn-market h6 {
    margin: 0;
    font-weight: 600;
    transition: color 0.2s ease;
}

.btn-market:hover h6 {
    color: #495057;
}

.btn-market.active h6 {
    color: white;
}

.btn-market.active:hover h6 {
    color: white;
}

/* Hide check-circle icons by default */
.btn-market .iconify[data-icon="ant-design:check-circle-fill"] {
    display: none;
}

/* Show check-circle icon only when button is active */
.btn-market.active .iconify[data-icon="ant-design:check-circle-fill"] {
    display: inline-block;
}

/* Trade Actions Button Styles */
.trade-action {
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.trade-action:hover {
    background-color: rgba(84, 84, 144, 0.1);
    border-color: rgba(84, 84, 144, 0.2);
}

.trade-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading Indicator Styles */
[data-flux-loading-indicator] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    transition: opacity 0.3s ease;
    z-index: 10;
}

[data-flux-loading-indicator].opacity-0 {
    opacity: 0;
    pointer-events: none;
}

/* Livewire Loading States */
.trade-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.trade-action:disabled [data-flux-loading-indicator] {
    opacity: 1;
    pointer-events: auto;
}

/* Success and Error States */
.trade-action .text-success {
    color: #28a745;
    font-weight: 600;
}

.trade-action .text-danger {
    color: #dc3545;
    font-weight: 600;
}

/* Icon Styles */
.trade-action .iconify {
    transition: transform 0.2s ease;
}

.trade-action:hover .iconify {
    transform: scale(1.1);
}

/* Button States */
.trade-action.loading {
    pointer-events: none;
}

.trade-action.success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.trade-action.error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

