/**
 * ADOBE CONFIDENTIAL
 * ___________________
 *
 * Copyright 2021 Adobe
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of Adobe and its suppliers, if any. The intellectual
 * and technical concepts contained herein are proprietary to Adobe
 * and its suppliers and are protected by all applicable intellectual
 * property laws, including trade secret and copyright laws.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe.
 */

/* Override styles applicable to all themes of Photoshop */
:root {
  --ccx-ss-phxs-font-size-md: 12px;
  --ccx-ss-phxs-font-size-mdd: 13px;
  --ccx-ss-phxs-font-size-lg: 14px;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  align-items: center;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  left: 0;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 1;
}

/** CCX-9487 - ONLY THEME CHANGES FOR PS ARE FOR dark && darkest **/
#ccx-ss-spectrum-provider .dark-theme {
  --ccx-share-sheet-border-color-1: #3d3f3f;
  --ccx-share-sheet-user-icon-background-color-1: #535353;
  --ccx-share-sheet-user-icon-border-color-1: #737373;
  --ccx-share-sheet-user-icon-text-color-1: #ffffff;
  --ccx-share-sheet-user-icon-text-color-2: #d6d6d6;
}

#ccx-ss-spectrum-provider .darkest-theme {
  --ccx-share-sheet-border-color-1: #2c2c2c;
  --ccx-share-sheet-user-icon-background-color-1: #323232;
  --ccx-share-sheet-user-icon-border-color-1: #525252;
  --ccx-share-sheet-user-icon-text-color-1: #ffffff;
  --ccx-share-sheet-user-icon-text-color-2: #d6d6d6;
}

/** Remove Sharesheet overrides to allow host CSS settings */
#ccx-ss-spectrum-provider .ccx-ss-invite-wrapper,
#ccx-ss-spectrum-provider #ccx-ss-invite,
#ccx-ss-spectrum-provider #ccx-ss-invite-save-view,
#ccx-ss-spectrum-provider #ccx-ss-invite-saving-view,
#ccx-ss-spectrum-provider .ccx-ss-generic-confirmation,
#ccx-ss-spectrum-provider #ccx-ss-offline,
#ccx-ss-spectrum-provider #ccx-ss-invite-loader,
#ccx-ss-spectrum-provider > div.ccx-ss-dialog {
  color: inherit;
}

#ccx-ss-invite .ccx-ss-action-header {
  padding-top: 0;
}

/** INPUT OVERRIDES CCX-8896 **/
#ccx-ss-flex-input-textarea-container > div,
#ccx-ss-flex-input-textarea-container > div > input#ccx-ss-flex-input-textarea,
#ccx-ss-invite-message > div.ccx-ss-invite-message-textarea,
#ccx-ss-invite-message > div.ccx-ss-invite-message-textarea > textarea.inputText,
#ccx-ss-invite-message > div.ccx-ss-invite-message-textarea > span.inputSpan {
  background: var(--ccx-share-sheet-input-background-color-1) !important;
  background-color: var(--ccx-share-sheet-input-background-color-1) !important;
  color: var(--ccx-share-sheet-text-color-8) !important;
}

#ccx-ss-flex-input
  #ccx-ss-flex-input-children
  .ccx-ss-invite-tag
  .spectrum-Tags-itemLabel
  .ccx-ss-tag-input {
  background: var(--ccx-share-sheet-input-background-color-1);
  background-color: var(--ccx-share-sheet-input-background-color-1);
  border: none;
}

#ccx-ss-flex-input
  #ccx-ss-flex-input-children
  .ccx-ss-invite-tag
  .spectrum-Tags-itemLabel
  .ccx-ss-tag-input
  .inputText,
#ccx-ss-flex-input
  #ccx-ss-flex-input-children
  .ccx-ss-invite-tag
  .spectrum-Tags-itemLabel
  .ccx-ss-tag-input
  .inputSpan {
  background: var(--ccx-share-sheet-input-background-color-1);
  background-color: var(--ccx-share-sheet-input-background-color-1);
  border: none !important;
  height: 24px;
  line-height: inherit;
  margin: 0;
  outline: none;
  padding: 0;
}

/** MARGIN PADDINGS **/
.ccx-ss-invite-tag {
  margin: 1px;
}

.spectrum-Tags-item .spectrum-ClearButton {
  margin-right: 0;
}

.spectrum-Tags-item {
  padding-right: 0;
}

/** CCX-8807 - Incorrect text height fix **/
#ccx-ss-invite-input {
  margin-bottom: 10px;
}

/** Textarea/span stabilization : CCX-8089 - CCX-8896 - Message input box styles change **/
.ccx-ss-invite-message-textarea {
  font-size: var(--ccx-ss-phxs-font-size-md) !important;
  /*** Ensures the UXP multi-line text area is multi-line ***/
  height: 160px;
  overflow: hidden;
}

/** FONTS CCX-8890 - general font sizes match Photoshop expectations **/
.ccx-ss-user-name-text {
  font-size: var(--ccx-ss-phxs-font-size-mdd) !important;
  font-weight: 700;
}

.ccx-ss-user-email {
  font-size: var(--ccx-ss-phxs-font-size-md) !important;
  font-weight: 100;
}

#ccx-ss-flex-input #ccx-ss-flex-input-children .ccx-ss-invite-tag .spectrum-Tags-itemLabel {
  font-size: var(--ccx-ss-phxs-font-size-mdd);
  font-weight: 100;
}

.spectrum-ActionButton-label {
  font-size: var(--ccx-ss-phxs-font-size-mdd);
}

/** && CCX-8892 - Plugin header is too large **/
#ccx-ss-collaborators-list-header {
  font-size: var(--ccx-ss-phxs-font-size-md) !important;
}

.ccx-ss-user-card-right-child-owner {
  font-size: var(--ccx-ss-phxs-font-size-mdd) !important;
}

/** CCX-8891 - Inputs and drop-down background and font colors don't match the plugin **/
.spectrum-Dropdown .spectrum-Dropdown-label {
  font-size: var(--ccx-ss-phxs-font-size-mdd);
}

/** SIZES **/
.ccx-ss-predictivelist-container {
  position: relative;
}

.ccx-ss-predictivelist-container #ccx-ss-predictive-list {
  border-color: var(--ccx-share-sheet-border-color-1);
  border-radius: 5px;
  border-style: solid;
  border-width: 1px;
  height: auto;
  margin-top: 8px;
  min-height: 50px;
}

.spectrum-Popover .spectrum-Menu .spectrum-Menu-item {
  font-size: var(--ccx-ss-phxs-font-size-mdd);
}

/** PS elements ONLY **/
#share-sheet-extension {
  border: none;
  height: 480px;
  position: absolute;
  width: 380px;
  z-index: 1;
}

#share-sheet-extension-container {
  border-color: var(--ccx-share-sheet-border-color-1);
  border-radius: 5px;
  border-style: solid;
  border-width: 2px;
  height: 468px;
  overflow: hidden;
  position: relative;
  width: 380px;
}

.share-sheet-extension-arrow-container {
  height: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.share-sheet-extension-arrow svg {
  bottom: -2px;
  height: auto;
  max-width: 26px;
  position: absolute;
  right: 40px;
  top: 1px;
}

.share-sheet-extension-arrow path {
  fill-opacity: 1;
  opacity: 1;
}

#share-sheet-extension-debug {
  align-items: center;
  display: flex;
  justify-content: center;
  position: relative;
}

#share-sheet-arrow {
  background: none;
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/** Additional specificity to override UXP :hover styling. The component styling is overwriten by UXP spectrum button styles **/
.ccx-ss-project-group-card:hover {
  background-color: var(--ccx-share-sheet-hover-background-color) !important;
}

/** Prevent override of display: flex from .spectrum-FieldLabel CCX-9936*/
.ccx-ss-invite-message-title {
  display: inline !important;
}
