/* C2C styles.

   developer:   marionm, dsherman
   requires:    nothing
   ========================================================================== */

.wolfram-c2c-trigger {
    cursor: pointer;
    position: relative;
}

.wolfram-c2c-wrapper {
    border-radius: 5px;
    border: 1px solid transparent;
    display: inline-block;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 5px !important;
}

.wolfram-c2c-wrapper:hover {
    background: linear-gradient(0deg, rgb(40 200 250 / 5%) 0%, rgb(40 200 250 / 0) 20%, rgb(40 200 250 / 0) 80%, rgb(40 200 250 / 5%) 100%);
    border: 1px solid #e8f3ff00;
    box-shadow: 0 0 6px 0px rgb(40 190 250 / 40%);
}

.wolfram-c2c-wrapper:active {
    background: linear-gradient(0deg, rgb(40 200 250 / 10%) 0%, rgb(40 200 250 / 0) 20%, rgb(40 200 250 / 0) 80%, rgb(40 200 250 / 10%) 100%);
    border: 1px solid #c1d4e8db;
    box-shadow: 0 0 6px 0px rgb(40 190 250 / 50%);
}

.wolfram-c2c-inline-wrapper {
    border-radius: 5px;
    display: inline;
}

.wolfram-c2c-inline-wrapper:hover {
    background: #e8f3ff;
    outline: 3px solid #e8f3ff;
}

.wolfram-c2c-inline-wrapper:active {
    background: #c3e1fa;
    outline: 3px solid #c3e1fa;
}

/*dark mode*/
.dark-mode { background: #222; padding: 1rem; }
.dark-mode .wolfram-c2c-wrapper:hover { background: linear-gradient(0deg, #2d485e 0%, #192835 20%, #192835 80%, #2d485e 100%); }
.dark-mode .wolfram-c2c-wrapper:active { background: linear-gradient(0deg, #2d485e 0%, #192835 20%, #192835 80%, #2d485e 100%); }




/* ==========================================================================
   top tooltips (appears above the trigger element)
   ========================================================================== */

.wolfram-c2c-tooltip {
    background: #f0f0f0;
    border-radius: 3px;
    border: 1px solid #ddd;
    color: #666;
    font-family: Arial, sans-serif;
    font-size: 0;
    font-style: normal;
    font-weight: 400;
    line-height: 0;
    margin: 12px auto 12px auto;
    opacity: 0;
    padding: 9px 9px 8px;
    pointer-events: none;
    position: absolute;
    text-align: center;
    visibility: hidden;
    white-space: nowrap;
    width: 0;
    z-index: 999999;
}

.wolfram-c2c-tooltip.show {
    font-size: 12px;
    opacity: 1;
    transition: all .2s ease;
    visibility: visible;
    width: 165px;
}

.wolfram-c2c-tooltip.hide {
    font-size: 0;
    opacity: 0;
    transition: all .2s ease;
    visibility: hidden;
    width: 0;
}

.wolfram-c2c-tooltip:before {
    border-bottom: 2px solid transparent;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 2px solid #f0f0f0;
    content: '';
    display: block;
    height: 0;
    left: 0;
    margin: auto;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 20px;
    width: 0;
    z-index: 999999;
}

.wolfram-c2c-tooltip:after {
    border-bottom: 3px solid transparent;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 3px solid #ddd;
    content: '';
    display: block;
    height: 0;
    left: 0;
    margin: auto;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 20px;
    width: 0;
    z-index: 999998;
}

.wolfram-c2c-tooltip.show:before {
    border-bottom: 9px solid transparent;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 9px solid #f0f0f0;
    opacity: 1;
    top: 31px;
    transition: all .2s ease;
}

.wolfram-c2c-tooltip.show:after {
    border-bottom: 10px solid transparent;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 10px solid #ddd;
    opacity: 1;
    top: 31px;
    transition: all .2s ease;
}

/* ==========================================================================
   bottom tooltips (appears below the trigger element)
   ========================================================================== */

.wolfram-c2c-tooltip.below:before {
    border-bottom: 2px solid #f0f0f0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 2px solid transparent;
    content: '';
    display: block;
    height: 0;
    left: 0;
    margin: auto;
    opacity: 0;
    position: absolute;
    right: 0;
    top: -10px;
    width: 0;
    z-index: 999999;
}

.wolfram-c2c-tooltip.below:after {
    border-bottom: 3px solid #ddd;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 3px solid transparent;
    content: '';
    display: block;
    height: 0;
    left: 0;
    margin: auto;
    opacity: 0;
    position: absolute;
    right: 0;
    top: -10px;
    width: 0;
    z-index: 999998;
}

.wolfram-c2c-tooltip.below.show:before {
    border-bottom: 9px solid #f0f0f0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 9px solid transparent;
    opacity: 1;
    top: -17px;
    transition: all .2s ease;
}

.wolfram-c2c-tooltip.below.show:after {
    border-bottom: 10px solid #ddd;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 10px solid transparent;
    opacity: 1;
    top: -19px;
    transition: all .2s ease;
}

/* ==========================================================================
   tooltip icons
   ========================================================================== */

.wolfram-c2c-tooltip i {
    background: url('img/icon-clipboard.png') no-repeat center left;
    background-size: contain;
    display: inline-block;
    height: 0;
    margin: -3px 4px 0 0;
    vertical-align: middle;
    width: 0;
    pointer-events: none;
}

.wolfram-c2c-tooltip.copied i {
    background: url('img/icon-checkmark.png') no-repeat center left;
    background-size: contain;
}

.wolfram-c2c-tooltip.error i {
    background: url('img/icon-error.png') no-repeat center left;
    background-size: contain;
}

.wolfram-c2c-tooltip.show i {
    height: 18px;
    transition: all .2s ease;
    width: 14px;
}

/* ==========================================================================
   tooltip labels
   ========================================================================== */

.wolfram-c2c-tooltip span { pointer-events: none; }

.wolfram-c2c-tooltip span:before {
    content: 'Copy code to clipboard.';
    display: inline;
}

.wolfram-c2c-tooltip.copied span:before { content: 'Copied!'; }

.wolfram-c2c-tooltip.error span:before { content: 'Unable to copy.'; }