/*
 * Copyright (C) 2020 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */

.content-view.animation {
    position: relative;
    width: calc(100% - 8px);
    margin: 4px;
    background-color: var(--background-color-content);
    border: 1px solid var(--border-color);
}

.content-view.animation.selected {
    outline: auto -webkit-focus-ring-color;
}

.content-view.animation > header {
    display: flex;
    align-items: center;
    height: var(--navigation-bar-height);
    padding: 0 6px;
    font-size: 13px;
}

.content-view.animation > header > .titles {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-view.animation > header > .titles > .title {
    color: var(--text-color-gray-dark);
}

.content-view.animation > header > .titles > .title > code {
    font-family: Menlo, monospace;
    font-size: 11px;
}

.content-view.animation > header > .titles > .subtitle {
    color: var(--text-color-gray-medium);
}

.content-view.animation > header > .titles > .subtitle:not(:empty)::before {
    content: "\00A0\2014\00A0"; /* &nbsp;&mdash;&nbsp; */;
}

.content-view.animation > header > .navigation-bar {
    border: none;
    opacity: 0;
}

.content-view.animation:hover > header > .navigation-bar {
    opacity: 1;
}

.content-view.animation > .preview {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: hsl(0, 0%, 96%);
}

.content-view.animation > .preview > svg {
    width: 100%;
}

body[dir=rtl] .content-view.animation > .preview > svg {
    transform: scaleX(-1);
}

.content-view.animation > .preview > svg rect {
    fill: transparent;
}

.content-view.animation > .preview > svg > .delay line {
    stroke: var(--border-color);
    stroke-width: 2;
}

.content-view.animation > .preview > svg > .active path {
    fill: var(--glyph-color-active);
    fill-opacity: 0.5;
    stroke: var(--glyph-color-active);
    stroke-width: 1;
}

.content-view.animation > .preview > svg > .active circle {
    fill: var(--text-color);
}

.content-view.animation > .preview > svg > .active line {
    stroke: var(--text-color);
    stroke-width: 2;
}

.content-view.animation > .preview > span {
    padding: 4px;
    color: var(--text-color-secondary);
}

@media (prefers-color-scheme: dark) {
    .content-view.animation > header > .titles > .title {
        color: var(--text-color);
    }

    .content-view.animation > header > .titles > .subtitle {
        color: var(--text-color-secondary);
    }

    .content-view.animation > .preview {
        background-color: hsl(0, 0%, 20%);
    }
}
