/* === Imports === */
@import url('wsexchange_ocean_progrBar.css');
@import url('wsexchange_ocean_processing.css');

/* === Exchange Wrapper === */
.wsexch {}

.exchange-wrapper {
 margin: 5vh auto;
 display: flex;
 flex-direction: column;
 gap: 12px;
 width: 100%;
 max-width: 580px;
 padding: 20px;
 position: relative;
 border: 1px solid #243048;
 border-radius: 8px;
 box-sizing: border-box;
 color: #e0e7ef;
 box-shadow: 0 2px 12px rgba(22,36,50, 0.28);
 background: linear-gradient(130deg, #191f29 0%, #22303d 100%);
 font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.exchange-wrapper.widgetMode2 {
 max-width: 720px;
 background: #181d23;
 box-shadow: none;
 border: 1px solid #22303d;
}

.fields-swap-container {
 display: flex;
 align-items: center;
 gap: 8px;
 width: 100%;
}

/* === Field Units and Labels === */
.field-unit {
 display: flex;
 flex-direction: column;
 flex: 1;
}
.field-label {
 font-size: 0.92rem;
 color: #f7c873;
 margin-bottom: 0.3rem;
 font-weight: 600;
 padding-left: 5px;
 letter-spacing: 0.02em;
}

/* === Input and Dropdown Containers === */
.input-dropdown-container {
 display: flex;
 width: 100%;
 border: 1px solid #2e394b;
 border-radius: 6px;
 box-sizing: border-box;
 position: relative;
 background: #222b36;
}
.amount-input {
 flex: 1;
 padding: 0.6rem 0.8rem;
 font-size: 1.1rem;
 border: none;
 outline: none;
 background-color: #161b23;
 border-radius: 6px 0 0 6px;
 flex: 36%;
 color: #f7c873;
}
.amount-input::placeholder {
 color: #aeb2b8;
}
.amount-input:focus {
 background-color: #21272e;
}
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
 -webkit-appearance: none;
 margin: 0;
}
.amount-input[type=number] {
 -moz-appearance: textfield;
}

/* === Spinner === */
.wsexch .spinner {
 position: absolute;
 display: block;
 width: 32px;
 height: 32px;
 top: 10px;
 left: 15px;
}
.wsexch .spinner-base {}
.wsexch .spDisabled {
 display: none;
}
.wsexch .spinner > b {
 position: absolute;
 display: inline-block;
 width: 100%;
 height: 100%;
 border: 5px solid rgba(35, 56, 75, 0.15);
 border-top-color: #ee9847;
 border-radius: 50%;
 animation: wsexchSpinner 0.7s ease-in-out infinite;
}
@keyframes wsexchSpinner {
 0% { transform: rotate(0deg);}
 100% { transform: rotate(360deg);}
}

/* === Dropdown === */
.custom-dropdown {
 position: relative;
 width: 100%;
 border-left: 1px solid #2e394b;
 border-radius: 0 6px 6px 0;
 box-sizing: border-box;
 flex: 64%;
 background: #222b36;
}
.dropdown-button {
 width: 100%;
 padding: 0.6rem 0.8rem;
 font-size: 1rem;
 background-color: #161b23;
 border: none;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: space-between;
 border-radius: 0 6px 6px 0;
 box-sizing: border-box;
 color: #b9dad1;
}
.dropdown-button:hover {
 background-color: #23303e;
}
.dropdown-button .currency-img {
 font-size: 32px;
 width: 42px;
 height: 42px;
 display: inline-block;
 text-align: center;
 line-height: 42px;
 margin-right: 0.5rem;
 filter: drop-shadow(0 0 2px #e7b53a33);
}
.currency-img {
 border-radius: 0;
 width: 42px;
 height: 42px;
 font-size: 32px;
 display: inline-block;
 text-align: center;
 line-height: 42px;
 margin-right: 0.5rem;
}
.dropdown-button .currency-details {
 flex-grow: 0;
 overflow: hidden;
 width: calc(100% - 42px);
 text-overflow: ellipsis;
 display: flex;
 flex-direction: column;
 text-align: left;
}
.dropdown-button .currency-header {
 font-weight: bold;
 font-size: 0.9rem;
 color: #f7c873;
}
.dropdown-button .currency-name {
 font-size: 0.8rem;
 color: #e9d6a5;
}
.dropdown-button .dropdown-arrow {
 font-size: 0.8rem;
 transition: transform 0.3s ease;
 color: #e7b53a;
}
.custom-dropdown.open .dropdown-arrow {
 transform: rotate(180deg);
}
.dropdown-menu {
 display: none;
 position: absolute;
 top: 100%;
 left: 0;
 background: #232b36;
 border: 1px solid #2e394b;
 width: 100%;
 max-height: 50vh;
 overflow-y: auto;
 z-index: 1000;
 border-radius: 0 0 6px 6px;
 box-shadow: 0 2px 10px rgba(50,34,18,0.18);
}
.custom-dropdown.open .dropdown-menu {
 display: block;
}
.dropdown-item {
 padding: 0.6rem 1rem;
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 0.5rem;
 color: #f7c873;
 background: transparent;
}
.dropdown-item:hover {
 background-color: #333c47;
 color: #d86e2b;
}
.dropdown-item .currency-img {
 font-size: 32px;
 width: 42px;
 height: 42px;
 display: inline-block;
 text-align: center;
 line-height: 42px;
}

/* === Currency Info === */
.currency-info {
 display: flex;
 flex-direction: column;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 text-align: left;
 color: #eee;
}
.currency-header {
 font-weight: bold;
 font-size: 0.9rem;
 color: #e7b53a;
}
.currency-name {
 font-size: 0.8rem;
 color: #c5cfa6;
}

/* === Exchange Button === */
.exchange-button {
 padding: 0.6rem 1rem;
 font-size: 1rem;
 background-color: #ee9847;
 color: #222b36;
 border: none;
 border-radius: 6px;
 cursor: pointer;
 transition: background-color 0.3s ease;
 font-weight: 600;
 box-shadow: 0 1px 4px #1d2235a0;
 letter-spacing: 0.06em;
}
.exchange-button:disabled {
 background-color: #333;
 color: #555;
 cursor: not-allowed;
}
.exchange-button:hover:not(:disabled) {
 background-color: #e94d1d;
 color: #fff;
}
.exchange-button-spinner {
 margin-top:3px;
 display: inline-block;
 width: 26px;
 height: 26px;
 border: 2px solid rgba(255, 216, 115, 0.18);
 border-left-color: #ee9847;
 border-radius: 50%;
 animation: spinExchangeButton 1.2s linear infinite;
}
@keyframes spinExchangeButton {
to {transform: rotate(360deg);}
}

/* === Info and Error Styles === */
.field-validation-hint,
.info-container {
 margin-top: 0.3rem;
 font-size: 0.95rem;
 color: #e6b900;
 background-color: #463210;
 border: 1px solid #e6b90066;
 border-radius: 4px;
 display: none;
 line-height: 1.5rem;
 padding: 0.5rem;
}
.error-border {
 border: 1px solid #e95d0a !important;
 background: #341a18 !important;
}

/* === Middle Info Box === */
.middleInfoBx-wrapper {
 display: flex;
 align-items: center;
 justify-content: flex-start;
}
.middleInfoBx {
 flex: 0 1 75%;
 display: flex;
 flex-direction: column;
 font-size: 13px;
 color: #b6b9b3;
}
.rateLn {
 display: grid;
 grid-template-columns: max-content 1fr;
 color: #c7c4ae;
 margin: 8px 0;
 background: linear-gradient(to left, rgba(254, 219, 114, 0.03), rgba(29, 35, 51, 0.08));
 padding: 8px;
 border-radius: 8px;
}
.rateLn > u {
 text-decoration: none;
 white-space: nowrap;
 color: #f7c873;
}
.rateLn > u:after {
 content: ":";
}
.rateLn > b {
 white-space: nowrap;
 padding-left: 7px;
 font-weight: normal;
 color: #e7b53a;
}
.rateLn > i {
 font-style: normal;
 color: #93ad9b;
}

/* === Swap Button === */
.swap-button-wrapper {
 flex: 0 1 25%;
 display: flex;
 align-items: center;
 justify-content: flex-end;
}
.swap-button {
 background-color: #17427a;
 color: #ffe993;
 border: none;
 border-radius: 8px;
 width: 42px;
 height: 42px;
 cursor: pointer;
 font-size: 1.2rem;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background-color 0.3s ease, transform 0.2s ease;
}
.swap-button:hover {
 background-color: #c2421b;
 color: #fff;
 transform: scale(1.08);
}

/* === Info Block === */
.widgetInfoBlock {
 display: block;
 margin: 1vh 0;
 color: #ffe993;
}
.widgetInfoBlock:empty {
 display: none;
}
.ibTop {
 color: #e7b53a;
 font-size: 1rem;
}
.ibTerms {
 color: #a7bba8;
 font-size: 0.8rem;
 border-top: 1px solid #2a2a1a;
 padding-top: 12px;
}
.ibBottom {
 color: #7e8d83;
 font-size: 0.8rem;
}

/* === Exchange Error === */
.exchange-button-error {
 background-color: #4d1c14;
 color: #ffc19c;
 padding: 32px 10px;
 border: 1px solid #e95d0a;
 border-radius: 5px;
 font-size: 1.1rem; 
 text-align: center;
 width: 100%;
 box-sizing: border-box;
}
.exchange-button-error p {
 line-height: 1.5rem;
}
.exchange-button-error a {
 color: #ee9847;
}
.exchange-button-error a:hover {
 color: #e95d0a;
}

/* === Responsive Adjustments === */
@media (min-width: 980px) {
 .exchange-wrapper.widgetMode2 {
   border: 1px solid #343842;
   background: linear-gradient(90deg, #181d23 60%, #232b36 100%);
 }
}
@media (max-width: 640px) {
 .exchange-wrapper {}
 .exchange-wrapper.widgetMode1 {
   border: none;
   background: 0;
   box-shadow: none;
 }
 .exchange-wrapper.widgetMode2 {}
 .fields-swap-container {
   flex-direction: column;
   align-items: stretch;
 }
 .input-dropdown-container {
   flex-direction: column;
 }
 .field-label {
   text-align: center;
   margin-bottom: 12px;
 }
 .custom-dropdown {
   width: 100%;
   border-left: none;
 }
 .amount-input {
   border-radius: 6px 6px 0 0;
   text-align: center;
 }
 .dropdown-button {
   width: 100%;
   background: #181d23;
   border-top: 1px solid #25303c;
   border-radius: 0 0 6px 6px;
 }
 .wsexch .spinner {
   width: 18px;
   height: 18px;
   top: 3px;
   left: 50%;
   margin-left: -9px;
 }
 .dropdown-button .currency-img,
 .dropdown-item .currency-img {
   font-size: 28px;
   width: 32px;
   height: 32px;
   line-height: 32px;
 }
 .middleInfoBx-wrapper {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: flex-start;
 }
 .middleInfoBx {
   flex: 1;
   display: flex;
   flex-direction: column;
   font-size: 12px;
 }
 .rateLn {
   margin: 5px 0;
   background: none;
   padding: 5px;
 }
 .swap-button-wrapper {
   flex: 1;
   align-items: center;
   justify-content: center;
 }
 .swap-button {
   width: 42px;
   height: 42px;
   font-size: 1.2rem;
   margin: 1px 0;
 }
 .currency-header,
 .currency-name {
   font-size: 0.75rem;
 }
 .exchange-button {
   width: 100%;
 }
 .swap-button-wrapper {
   align-self: center;
   margin: 10px 0;
 }
}

/* === Recipient Field === */
.recipBx.field-container {
 position: relative;
 margin: 22px auto;
 font-family: Arial, sans-serif;
 display: block;
}
.recipBx.field-container .field-label-above {
 display: block;
 margin-bottom: 5px;
 font-size: 16px;
 height: 26px;
 line-height: 26px;
 color: #e9b97d;
 background: linear-gradient(to left, rgba(0,0,0,0), rgba(254,219,114,0.04));
 border-radius: 5px;
 padding: 5px 8px 5px 12px;
}
.recipBx.field-container .field-label-above:after {
 content: ':';
}
.recipBx.field-container .input-wrapper {
 position: relative;
 width: 100%;
}
.recipBx.field-container .field-input {
 width: 100%;
 padding: 22px 12px 14px;
 font-size: 20px;
 border: 1px solid #353c48;
 border-radius: 4px;
 box-sizing: border-box;
 transition: border-color 0.2s ease, box-shadow 0.2s ease;
 background-color: #181d23;
 color: #e5c97c;
}
.recipBx.field-container .field-input:focus {
 border-color: #ee9847;
 box-shadow: 0 0 5px rgba(238, 152, 71, 0.16);
 outline: none;
 color: #ffe993;
}
.recipBx.field-container .field-placeholder-label {
 position: absolute;
 top: 50%;
 left: 12px;
 right: 12px;
 transform: translateY(-50%);
 font-size: 20px;
 color: #948448;
 pointer-events: none;
 transition: all 0.2s ease;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 z-index: 2;
}
.recipBx.field-container .field-input:focus + .field-placeholder-label,
.recipBx.field-container .field-input:not(:placeholder-shown) + .field-placeholder-label {
 top: 12px;
 left: 12px;
 right: 10px;
 font-size: 14px;
 color: #e7b53a;
}
.field-validation-hint.hintEnabled {
 display: block;
}
.recipBx.field-container .field-input.isvalidInput {
 background: #253b2c;
 color: #9dce98;
}
.recipBx.field-container .field-input.isvalidInput:focus {
 border-color: #77f177;
 box-shadow: 0 0 5px rgba(102, 255, 144, 0.13);
}
.recipBx.field-container .field-input.isvalidInput + .field-placeholder-label {
 color: #89e086;
}

@media (max-width: 480px) {
 .recipBx.field-container {
   margin-bottom: 15px;
 }
 .recipBx.field-container .field-label-above {
   font-size: 13px;
 }
 .recipBx.field-container .field-input {
   font-size: 16px;
   padding: 26px 8px 8px;
 }
 .recipBx.field-container .field-placeholder-label {
   font-size: 16px;
 }
 .recipBx.field-container .field-input:focus + .field-placeholder-label,
 .recipBx.field-container .field-input:not(:placeholder-shown) + .field-placeholder-label {
   font-size: 12px;
   top: 16px;
   left: 10px;
   right: 10px;
 }
}
