@import "./lib/vc_ui-icon-ai.less";
@wpb-icon-color: #5e5e5e;
@wpb-icon-hover-color: #0772CE;

// Modal
.vc_modal-ai-container--promo .vc_modal-popup-content {
    max-height: 550px;
    margin: auto;
}

.vc-modal.vc_modal-ai {
    width: 500px !important;
}

.vc_ui-helper-modal-ai-preloader {
    position: absolute;
    top: 51px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    z-index: 1;
    overflow-y: auto;

    &.vc_ui-hidden {
        display: none;
    }

    &.vc_ui-helper-modal-ai-preloader-with-tokens {
        top: 76px;
    }
}

.vc_ui-helper-popup-promo .vc_ui-ai-promo,
.vc_ui-helper-modal-ai-preloader .vc_heading,
.vc_ui-helper-modal-ai-preloader .vc_description,
.vc_ui-helper-modal-ai-preloader .vc_ui-ai-promo {
    margin: 0 0 30px;
    text-align: center;
}

.vc_ui-helper-modal-ai-placeholder {
    .vc_ui-ai-promo {
        margin: 0 0 15px;
    }

    .vc_description {
        margin: 0;
        font-weight: 500;
        color: #939393;
        font-style: italic;
    }
}

.vc_ui-modal-ai-loading {
    overflow: hidden;
}

.vc_ui-helper-popup-promo.wpb-generating-content {
    top: 75px;
}

// Messages
#vc_ui-helper-modal-ai .vc_message {
    position: absolute;
    top: 76px; // the height of the modal header
    margin: 0;
    padding: 10px;
}

// Panel Header
.vc_ui-panel-header-heading .vc-ai-tokens-usage {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
    min-height: 16px;
}

// Panel Edit Form
.wpb-edit-form-ai-icon {
    position: absolute;
    top: -25px;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: @wpb-icon-color;
    font-size: 19px;
    cursor: pointer;
    transition: 0.2s color ease-in-out;

    &:hover {
        color: @wpb-icon-hover-color;
    }

    span {
        margin-left: 4px;
        font-size: 14px;
        font-weight: 600;
    }

    &.wpb-edit-form-ai-icon--settings {
        top: 0;
    }
}

// Settings Tab
.wpb-ai-credits-message {
    width: 500px;
    margin: 50px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;

    .vc_ui-ai-promo, .vc_heading, .vc_description, .vc_ui-button {
        margin: 0;
    }
}

.wpb-copy-output {
  margin-left: auto;
  cursor: pointer;
  transition: color .2s ease-in-out;

  &:hover {
    color: @wpb-icon-hover-color;
  }

  &.disabled {
    opacity: .5;
    cursor: not-allowed;
    &:hover {
      color: @wpb-icon-color;
    }
  }
}

@media (min-width: 1200px) {
    .wpb-ai-credits-message {
        margin: 50px auto 0 350px;
    }
}

@media (max-width: 767px) {
    .wpb-ai-credits-message {
        width: 100%;
        margin: 10px;
    }
}
