/* ========== Form Notifications Modal ========== */

#griffinforms-builder-modal-formnotifications .modal-body {
    padding: 0;
    overflow: hidden;
}

/* ── Two-column shell (mirrors Form Options) ─────────────────────────────── */

#griffinforms-builder-modal-formnotifications .gf-formoptions-body {
    display: flex;
    height: 540px;
}

/* ── Left sidebar nav ────────────────────────────────────────────────────── */

#griffinforms-builder-modal-formnotifications .gf-formoptions-sidenav {
    width: 172px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 8px;
    overflow-y: auto;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-indicator {
    position: absolute;
    left: 8px;
    right: 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--gf-color-primary, #6f2cf2) 10%, transparent);
    pointer-events: none;
    transition: top 220ms cubic-bezier(0.4, 0, 0.2, 1),
                height 220ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    color: var(--gf-color-text, #333);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 160ms ease;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-btn:hover {
    color: var(--gf-color-primary, #6f2cf2);
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-btn--active {
    color: var(--gf-color-primary, #6f2cf2);
    font-weight: 400;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-chevron {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 160ms ease;
    color: var(--gf-color-primary, #6f2cf2);
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-btn--active .gf-formoptions-tab-chevron {
    opacity: 1;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-tab-btn-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Right content area ──────────────────────────────────────────────────── */

#griffinforms-builder-modal-formnotifications .gf-formoptions-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-panel {
    display: none;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-panel.gf-formoptions-panel--active {
    display: block;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-panel-body {
    padding: 28px 32px;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-row {
    align-items: flex-start;
}

#griffinforms-builder-modal-formnotifications .gf-formoptions-row label.form-label {
    padding-top: 6px;
    color: var(--gf-color-text, #333);
}

/* ── Form control token styling ──────────────────────────────────────────── */

#griffinforms-builder-modal-formnotifications .form-check-input {
    accent-color: var(--gf-color-primary, #6f2cf2);
    flex-shrink: 0;
}

#griffinforms-builder-modal-formnotifications .form-check-input[type="checkbox"]:checked {
    background-color: var(--gf-color-primary, #6f2cf2);
    border-color: var(--gf-color-primary, #6f2cf2);
}

/* ── Create message link ─────────────────────────────────────────────────── */

.gf-notif-create-message-link {
    color: var(--gf-color-primary, #6f2cf2) !important;
    text-decoration: none;
}

.gf-notif-create-message-link:hover {
    color: var(--gf-color-primary-hover, #5a1fd6) !important;
    text-decoration: underline;
}

/* ── Coming soon badge ───────────────────────────────────────────────────── */

.gf-notif-coming-soon-badge {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    background: var(--gf-color-surface-hover, #ebebeb);
    color: var(--gf-color-muted, #888);
    border-radius: 4px;
    padding: 2px 6px;
}

/* ── Notification card list ──────────────────────────────────────────────── */

.gf-notif-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 24px;
}

.gf-notif-card-list.ui-sortable-helper {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.gf-notif-card-placeholder {
    border: 2px dashed var(--gf-color-border, #d0d0d0);
    border-radius: 8px;
    background: var(--gf-color-surface, #f9f9f9);
    height: 52px;
}

/* ── Notification card ───────────────────────────────────────────────────── */

.gf-notif-card {
    border: 1px solid var(--gf-color-border, #e0e0e0);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.gf-notif-card-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: var(--gf-color-surface, #f9f9f9);
    gap: 4px;
    min-height: 44px;
}

.gf-notif-card-handle {
    cursor: grab;
    color: var(--gf-color-muted, #aaa);
    padding: 2px 4px;
    flex-shrink: 0;
    line-height: 0;
}

.gf-notif-card-handle:active {
    cursor: grabbing;
}

.gf-notif-card-channel-badge {
    font-size: 11px;
    background: var(--gf-color-surface-hover, #ebebeb);
    color: var(--gf-color-text, #444);
    font-weight: 500;
    border-radius: 4px;
}

.gf-notif-card-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--gf-color-muted, #888);
    flex-shrink: 0;
}

.gf-notif-card-toggle:hover {
    background: var(--gf-color-surface-hover, #f0f0f0);
    color: var(--gf-color-text, #333);
}

.gf-notif-card-chevron {
    transition: transform 200ms ease;
    flex-shrink: 0;
    display: block;
}

.gf-notif-card-body {
    padding: 14px;
    border-top: 1px solid var(--gf-color-border, #e0e0e0);
}

/* ── Sub-event heading row ───────────────────────────────────────────────── */

.gf-notif-subevent + .gf-notif-subevent {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gf-color-border, #ebebeb);
}

/* ── Recipient rows ──────────────────────────────────────────────────────── */

.gf-notif-recipients {
    display: flex;
    flex-direction: column;
}

.gf-notif-recipient-row.input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: 100%;
}

/* Type selector: fixed width, never shrinks */
.gf-notif-recipient-row .gf-notif-recipient-type {
    flex: 0 0 90px !important;
    width: 90px !important;
    min-width: 0 !important;
}

/* Value control: takes remaining space, must not overflow */
.gf-notif-recipient-row .gf-notif-recipient-value-field,
.gf-notif-recipient-row .gf-notif-recipient-value-static {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
}

/* Delete button: fixed, never shrinks */
.gf-notif-recipient-row .gf-notif-remove-recipient {
    flex: 0 0 auto !important;
    white-space: nowrap;
}

/* Border-radius fix: gf-app-control-input forces 8px on all corners */
.gf-notif-recipient-row.input-group > .gf-app-control-input:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.gf-notif-recipient-row.input-group > .gf-app-control-input:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Collapse double border between adjacent controls */
.gf-notif-recipient-row.input-group > .gf-app-control-input + .gf-app-control-input {
    margin-left: -1px !important;
}

.gf-notif-recipient-row .form-select,
.gf-notif-recipient-row .form-control {
    font-size: 13px;
}
