/* Light theme styles */

@import url('wsexchange_progrBar.css');
@import url('wsexchange_processing.css');

/* wsexchange wrapper */
.wsexch {}

/* WSExchange Widget container */
.exchange-wrapper {
 margin: 5vh auto;
 display: flex;
 flex-direction: column;
 gap: 12px;
 width: 100%;
 max-width: 580px;
 padding: 20px;
 position: relative;
}
.exchange-wrapper {
 border: 1px solid #ddd;
 border-radius: 8px;
 box-sizing: border-box;
 color: #000;
 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.exchange-wrapper {
 background: linear-gradient(45deg, #f3f3f3, #fafafa, #f3f3f3);
 font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.exchange-wrapper.widgetMode2 {
 max-width: 720px;
 background: #fff;
 box-shadow: none;
 border: none;
}
.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.9rem;
 color: #039;
 margin-bottom: 0.3rem;
 font-weight: 600;
 padding-left: 5px;
}

/* Input and dropdown containers */
.input-dropdown-container {
 display: flex;
 width: 100%;
 border: 1px solid #ccc;
 border-radius: 6px;
 box-sizing: border-box;
 position: relative;
}
.amount-input {
 flex: 1;
 padding: 0.6rem 0.8rem;
 font-size: 1.1rem;
 border: none;
 outline: none;
 background-color: #fff;
 border-radius: 6px 0 0 6px;
 flex: 36%;
 color: #03b;
}
.amount-input::placeholder {
 color: #aaa;
}
.amount-input:focus {
 background-color: #fff;
}
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
 -webkit-appearance: none;
 margin: 0;
}
.amount-input[type=number] {
 -moz-appearance: textfield;
}

/* Base 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(0, 0, 0, 0.1);
}
.wsexch .spinner > b {
 border-top-color: #3498db;
 border-radius: 50%;
 animation: wsexchSpinner 0.7s ease-in-out infinite;
}
@keyframes wsexchSpinner {
 0% {
   transform: rotate(0deg);
 }
 100% {
   transform: rotate(360deg);
 }
}

/* Dropdown components */
.custom-dropdown {
 position: relative;
 width: 100%;
 border-left: 1px solid #ccc;
 border-radius: 0 6px 6px 0;
 box-sizing: border-box;
 flex: 64%;
}
.dropdown-button {
 width: 100%;
 padding: 0.6rem 0.8rem;
 font-size: 1rem;
 background-color: #f5f5f5;
 border: none;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: space-between;
 border-radius: 0 6px 6px 0;
 box-sizing: border-box;
 color: #000;
}
.dropdown-button:hover {
 background-color: #e0e0e0;
}
.dropdown-button .currency-img {
 font-size: 32px;
 width: 42px;
 height: 42px;
 display: inline-block;
 text-align: center;
 line-height: 42px;
 margin-right: 0.5rem;
}
.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: #333;
}
.dropdown-button .currency-name {
 font-size: 0.8rem;
 color: #666;
}
.dropdown-button .dropdown-arrow {
 font-size: 0.8rem;
 transition: transform 0.3s ease;
 color: #000;
}
.custom-dropdown.open .dropdown-arrow {
 transform: rotate(180deg);
}

/* Dropdown menu and items */
.dropdown-menu {
 display: none;
 position: absolute;
 top: 100%;
 left: 0;
 background: #ffffff;
 border: 1px solid #ccc;
 width: 100%;
 max-height: 50vh;
 overflow-y: auto;
 z-index: 1000;
 border-radius: 0 0 6px 6px;
 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.custom-dropdown.open .dropdown-menu {
 display: block;
}
.dropdown-item {
 padding: 0.6rem 1rem;
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 0.5rem;
 color: #000;
}
.dropdown-item:hover {
 background-color: #f0f0f0;
}
.dropdown-item .currency-img {
 font-size: 32px;
 width: 42px;
 height: 42px;
 display: inline-block;
 text-align: center;
 line-height: 42px;
}

/* Currency information */
.currency-info {
 display: flex;
 flex-direction: column;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 text-align: left;
 color: #000;
}
.currency-header {
 font-weight: bold;
 font-size: 0.9rem;
 color: #333;
}
.currency-name {
 font-size: 0.8rem;
 color: #666;
}

/* Exchange button styles */
.exchange-button {
 padding: 0.6rem 1rem;
 font-size: 1rem;
 background-color: #007bff;
 color: #fff;
 border: none;
 border-radius: 6px;
 cursor: pointer;
 transition: background-color 0.3s ease;
}
.exchange-button:disabled {
 background-color: #ccc;
 cursor: not-allowed;
}
.exchange-button:hover:not(:disabled) {
 background-color: #0056b3;
}

.exchange-button-spinner {
 margin-top:3px;
 display: inline-block;
 width: 26px;
 height: 26px;
 border: 2px solid rgba(255, 255, 255, 0.2);
 border-left-color: #fff;
 border-radius: 50%;
 animation: spinExchangeButton 1.2s linear infinite;
}

@keyframes spinExchangeButton {
to {transform: rotate(360deg);}}

/* Information box and error styles */
.field-validation-hint,
.info-container {
 margin-top: 0.3rem;
 font-size: 0.9rem;
 color: #856404;
 background-color: #ffe;
 border: 1px solid #fec;
 border-radius: 4px;
 display: none;
 line-height: 1.5rem;
 padding: 0.5rem;
}
.error-border {
 border: 1px solid #d32f2f !important;
}

/* Middle information box */
.middleInfoBx-wrapper {
 display: flex;
 align-items: center;
 justify-content: flex-start;
}
.middleInfoBx {
 flex: 0 1 75%;
 display: flex;
 flex-direction: column;
 font-size: 12px;
 color: #000;
}

.rateLn {
 display: grid;
 grid-template-columns: max-content 1fr;
 color: #777;
 margin: 8px 0;
 background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.03));
 padding: 8px;
 border-radius: 8px;
}
.rateLn > u {
 text-decoration: none;
 white-space: nowrap;
 color: #555;
}
.rateLn > u:after {
 content: ":";
}
.rateLn > b {
 white-space: nowrap;
 padding-left: 7px;
 font-weight: normal;
 color: #333;
}
.rateLn > i {
 font-style: normal;
 color: #555;
}

/* Swap button styles */
.swap-button-wrapper {
 flex: 0 1 25%;
 display: flex;
 align-items: center;
 justify-content: flex-end;
}
.swap-button {
 background-color: #25d;
 color: #fff;
 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: #002244;
 transform: scale(1.05);
}

.widgetInfoBlock {
 display: block;
 margin: 1vh 0;
 color: #057;
}
.widgetInfoBlock:empty {
 display: none;
}
.ibTop {
 color: #057;
 font-size: 1rem;
}
.ibTerms {
 color: #777;
 font-size: 0.8rem;
 border-top: 1px solid #ddd;
 padding-top: 12px;
}
.ibBottom {
 color: #555;
 font-size: 0.8rem;
}

.exchange-button-error {
 background-color: #ffe6e6;
 color: #c30;
 padding: 32px 10px;
 border: 1px solid #fa9;
 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: #c30;
}

.exchange-button-error a:hover {
 color: #e52;
}

/* Responsive adjustments */
@media (min-width: 980px) {
 .exchange-wrapper.widgetMode2 {
   border: 1px solid #eee;
   background: linear-gradient(90deg, #f9f9f9, #fff, #f9f9f9);
 }
}

/* Responsive adjustments */
@media (max-width: 640px) {
 .exchange-wrapper {}
 .exchange-wrapper.widgetMode1 {
   border: none;
   background: 0;
   box-shadow: none;
 }
 .exchange-wrapper.widgetMode2 {}

 /* Adjust fields swap container */
 .fields-swap-container {
   flex-direction: column;
   align-items: stretch;
 }

 /* Make dropdowns full width */
 .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: #fff;
   border-top: 1px solid #ccc;
   border-radius: 0 0 6px 6px;
 }
 .wsexch .spinner {
   width: 18px;
   height: 18px;
   top: 3px;
   left: 50%;
   margin-left: -9px;
 }

 /* Adjust currency images in dropdowns */
 .dropdown-button .currency-img,
 .dropdown-item .currency-img {
   font-size: 28px;
   width: 32px;
   height: 32px;
   line-height: 32px;
 }

 /* Middle information box */
 .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;
 }

 /* Adjust swap button on mobile */
 .swap-button-wrapper {
   flex: 1;
   align-items: center;
   justify-content: center;
 }
 .swap-button {
   width: 42px;
   height: 42px;
   font-size: 1.2rem;
   margin: 1px 0;
 }

 /* Adjust currency text sizes */
 .currency-header,
 .currency-name {
   font-size: 0.75rem;
 }

 /* Make exchange button full width */
 .exchange-button {
   width: 100%;
 }

 /* Center swap button wrapper on mobile */
 .swap-button-wrapper {
   align-self: center;
   margin: 10px 0;
 }
}

/* Recipient field styles */
.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: #777;
 background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.03));
 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 #ccc;
 border-radius: 4px;
 box-sizing: border-box;
 transition: border-color 0.2s ease, box-shadow 0.2s ease;
 background-color: #fff;
 color: #03c;
}
.recipBx.field-container .field-input:focus {
 border-color: #007BFF;
 box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
 outline: none;
 color: #35e;
}
.recipBx.field-container .field-placeholder-label {
 position: absolute;
 top: 50%;
 left: 12px;
 right: 12px;
 transform: translateY(-50%);
 font-size: 20px;
 color: #aaa;
 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: #35e;
}
.field-validation-hint.hintEnabled {
 display: block;
}
.recipBx.field-container .field-input.isvalidInput {
 background: #f3fff3;
 color: #1a1;
}
.recipBx.field-container .field-input.isvalidInput:focus {
 border-color: #00FF00;
 box-shadow: 0 0 5px rgba(211, 255, 211, 0.2);
}
.recipBx.field-container .field-input.isvalidInput + .field-placeholder-label {
 color: #1a1;
}

@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;
 }
}


