/*
 * Copyright (C) 2013-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.
 */

.popover .edit-breakpoint-popover-content {
    position: relative;
    max-width: 420px;
    padding: 5px 15px;
}

.popover .edit-breakpoint-popover-content.wide {
    max-width: 460px;
}

.popover .edit-breakpoint-popover-content > label.toggle {
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popover .edit-breakpoint-popover-content > table {
    width: 100%;
}

.popover .edit-breakpoint-popover-content > table > tr > th {
    font-weight: bold;
    line-height: 23px;
    text-align: end;
    vertical-align: top;
    white-space: nowrap;
    color: hsl(0, 0%, 34%);
}

.popover .edit-breakpoint-popover-content > table > tr > td {
    padding-left: 5px;
}

.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor {
    width: 100%;
    padding: 4px 0 2px;
    -webkit-appearance: textfield;
    border: 1px solid hsl(0, 0%, 78%);
    background: var(--background-color-content);
}

.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor > .CodeMirror {
    width: 320px; /* NOTE: Fixed value, manually tuned to .edit-breakpoint-popover-content width. */
    height: auto;
}

.popover .edit-breakpoint-popover-content.wide .condition > .CodeMirror {
    width: 360px; /* NOTE: Fixed value, manually tuned to .edit-breakpoint-popover-content width. */
}

.popover .edit-breakpoint-popover-content input#edit-breakpoint-popover-ignore-count {
    width: 40px;
}

.popover .edit-breakpoint-popover-content input:is(#edit-breakpoint-popover-ignore-count, #edit-breakpoint-popover-auto-continue) {
    margin-inline: 0 4px;
}

.popover .edit-breakpoint-popover-content > .reference-page-link-container {
    position: absolute;
    bottom: 0.9em;
    inset-inline-end: 1.5em;
}

@media (prefers-color-scheme: dark) {
    .popover .edit-breakpoint-popover-content > table > tr > th {
        color: var(--text-color-secondary);
    }
}
