/* ========== Titlebar Wrapper ========== */
#griffinforms-app-titlebar {
    box-shadow: rgba(0, 0, 0, 0.133) 0px 1px 0px 0px;
    color: rgb(30, 30, 30);
    height: 60px;
}

/* ========== Fullscreen Close Button ========== */
.edit-form-fullscreen-mode-close.components-button {
    align-items: center;
    align-self: stretch;
    background: #1e1e1e;
    border: none;
    border-radius: 0;
    color: #fff !important;
    display: flex;
    height: 60px;
    position: relative;
    width: 60px;
}

/* ========== Icon Buttons (SVG) ========== */
.griffinforms-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.griffinforms-icon-btn svg {
    width: 36px;
    height: 36px;
    display: block;
}

.components-button {
    align-items: center;
    -webkit-appearance: none;
    background: none;
    border: 0;
    border-radius: 2px;
    box-sizing: border-box;
    color: var(--wp-components-color-foreground,#1e1e1e);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    height: 36px;
    margin: 0;
    padding: 6px 12px;
    text-decoration: none;
    min-width: 32px;
    padding: 0;
    width: 32px;
}

/* ========== Dropdown Menu Styles ========== */
.griffinforms-dropdown {
    position: relative;
    display: inline-block;
    min-width: 36px;
}

.griffinforms-dropdown-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 2px;
}

.griffinforms-dropdown-popover {
    position: absolute;
    top: 45px;
    right: 8px;
    z-index: 999;
    min-width: 160px;
    padding: 8px 0 0 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 1px #ccc, 0 2px 3px #0000000d, 0 4px 5px #0000000a, 0 12px 12px #00000008, 0 16px 16px #00000005;
    box-sizing: border-box;
    width: min-content;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.griffinforms-dropdown-popover.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ========== Dropdown Group ========== */
.griffinforms-dropdown-group-heading {
    color: #757575;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 12px;
    margin-top: 4px;
    padding: 0 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.griffinforms-dropdown-group {
    padding: 8px;
}

/* ========== Focus Styles ========== */
.griffinforms-dropdown-toggle:focus,
.griffinforms-dropdown-item-button:focus,
.griffinforms-dropdown-toggle:focus-visible,
.griffinforms-dropdown-item-button:focus-visible,
.gf-titlebar-btn:focus-visible {
    box-shadow: 0 0 0 1.5px blueviolet;
    outline: 3px solid #0000;
}

/* ========== Dropdown Buttons ========== */
.griffinforms-dropdown-item-button {
    height: auto;
    padding: 4px 8px;
    text-align: left;
    align-items: center;
    -webkit-appearance: none;
    background: none;
    border: 0;
    border-radius: 2px;
    box-sizing: border-box;
    color: var(--wp-components-color-foreground,#1e1e1e);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    margin: 0;
    text-decoration: none;
}

.griffinforms-dropdown-item-button:hover {
    color: blueviolet;
}

/* ========== Dropdown Item Content and Info ========== */
.griffinforms-dropdown-item-content {
    min-width: 160px;
    white-space: nowrap;
}

.griffinforms-dropdown-item-info {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 250px;
}

/* ========== Icon Hover Color Filter ========== */
.griffinforms-dropdown-item-button:hover .griffinforms-options-menu-icon {
    filter: brightness(0) saturate(100%) invert(23%) sepia(75%) saturate(4000%) hue-rotate(260deg) brightness(95%) contrast(97%);
}

.griffinforms-dropdown-item-button:hover #griffinforms-app-rules-btn-badge-count {
    background-color: blueviolet !important;
    color: #fff !important;
}

#griffinforms-app-rules-btn-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

/* ========== Labeled Titlebar Buttons ========== */
.gf-titlebar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 2px;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #1e1e1e;
    cursor: pointer;
    white-space: nowrap;
}

.gf-titlebar-btn:hover {
    background-color: #f0f0f0;
}

.gf-titlebar-btn img,
.gf-titlebar-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gf-titlebar-btn-outlined {
    border: 1px solid #949494;
}

.gf-titlebar-btn-outlined:hover {
    border-color: #1e1e1e;
    background: none;
}

/* ========== Left Sidebar Panel Toggle Buttons ========== */
#griffinforms-titlebar-left > div:first-child {
    flex-shrink: 0;
    width: 60px;
}

#griffinforms-titlebar-left-actions {
    padding-left: 24px;
}

.gf-titlebar-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: none;
    cursor: pointer;
    color: #1e1e1e;
}

.gf-titlebar-panel-btn:hover {
    background-color: #f0f0f0;
}

.gf-titlebar-panel-btn.is-active,
.gf-titlebar-panel-btn[aria-pressed="true"] {
    background-color: #1e1e1e;
    color: #fff;
}

.gf-titlebar-panel-btn svg,
.gf-titlebar-panel-btn img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.gf-titlebar-panel-btn.is-active img,
.gf-titlebar-panel-btn[aria-pressed="true"] img {
    filter: invert(1);
}
