/* ── Fideograph Feedback — Frontend Styles ─────────────────── */

/* Variables */
:root {
    --fgfb-primary:     #7c3b1e;
    --fgfb-primary-dk:  #5e2c14;
    --fgfb-bg:          #fdf9f5;
    --fgfb-border:      #e4d9cc;
    --fgfb-text:        #2c2116;
    --fgfb-muted:       #7a6a5a;
    --fgfb-star:        #c4853a;
    --fgfb-star-empty:  #d9cfc5;
    --fgfb-radius:      6px;
    --fgfb-shadow:      0 4px 24px rgba(44,33,22,.14);
    --fgfb-widget-z:    99990;
}

/* ── Shared form elements ───────────────────────────────────── */
.fgfb-form-wrap {
    max-width: 720px;
}

.fgfb-field {
    margin-bottom: 16px;
}

.fgfb-field-row {
    display: flex;
    gap: 16px;
}

.fgfb-field-row--two > .fgfb-field {
    flex: 1;
}

@media (max-width: 600px) {
    .fgfb-field-row {
        flex-direction: column;
        gap: 0;
    }
}

.fgfb-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fgfb-text);
    margin-bottom: 5px;
    font-family: inherit;
}

.fgfb-required {
    color: var(--fgfb-primary);
}

.fgfb-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--fgfb-border);
    border-radius: var(--fgfb-radius);
    background: #fff;
    font-size: 14px;
    color: var(--fgfb-text);
    font-family: inherit;
    transition: border-color .15s;
    outline: none;
}

.fgfb-input:focus {
    border-color: var(--fgfb-primary);
    box-shadow: 0 0 0 3px rgba(124,59,30,.1);
}

.fgfb-textarea {
    resize: vertical;
    min-height: 100px;
}

.fgfb-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a6a5a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

/* Stars */
.fgfb-stars {
    display: flex;
    gap: 4px;
}

.fgfb-star {
    background: none;
    border: none;
    padding: 0;
    font-size: 24px;
    color: var(--fgfb-star-empty);
    cursor: pointer;
    transition: color .1s, transform .1s;
    line-height: 1;
}

.fgfb-star:hover,
.fgfb-star.is-active {
    color: var(--fgfb-star);
}

.fgfb-star:hover {
    transform: scale(1.15);
}

/* Button */
.fgfb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--fgfb-primary);
    color: #fff;
    border: none;
    border-radius: var(--fgfb-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.fgfb-btn:hover {
    background: var(--fgfb-primary-dk);
    color: #fff;
}

.fgfb-btn:disabled {
    opacity: .6;
    cursor: default;
}

.fgfb-actions {
    margin-top: 8px;
}

/* Notices */
.fgfb-notice {
    padding: 12px 16px;
    border-radius: var(--fgfb-radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.fgfb-notice--success {
    background: #f0faf2;
    border: 1px solid #b2dfc0;
    color: #1e5c32;
}

.fgfb-notice--error {
    background: #fff5f5;
    border: 1px solid #f5c0c0;
    color: #7a1515;
}

/* ── Dedicated page form ────────────────────────────────────── */
.fgfb-page-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* Kill any theme drop-cap or first-letter styling inside the form */
.fgfb-page-wrap p::first-letter,
.fgfb-page-wrap p:first-child::first-letter,
.entry-content .fgfb-page-wrap p::first-letter {
    font-size: inherit;
    font-weight: inherit;
    float: none;
    line-height: inherit;
    margin: 0;
    padding: 0;
    color: inherit;
}

/* Suppress theme breadcrumb eyebrow on feedback page — plugin-scoped only */
body.page-template-default .fg-hero__eyebrow,
body.page-template-default .fg-breadcrumb,
body.page-template-default .fg-hero__breadcrumb {
    display: none !important;
}

/* ── Floating widget ─────────────────────────────────────────── */
.fgfb-widget-trigger {
    position: fixed;
    bottom: 28px;
    z-index: var(--fgfb-widget-z);
    background: var(--fgfb-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(124,59,30,.35);
    transition: background .15s, transform .15s;
    letter-spacing: .02em;
}

.fgfb-widget-trigger:hover {
    background: var(--fgfb-primary-dk);
    transform: translateY(-2px);
}

.fgfb-widget-trigger--right { right: 24px; }
.fgfb-widget-trigger--left  { left:  24px; }

.fgfb-widget-trigger__icon {
    font-size: 16px;
    line-height: 1;
}

/* Widget panel */
.fgfb-widget-panel {
    position: fixed;
    bottom: 88px;
    width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: var(--fgfb-widget-z);
    background: #fff;
    border: 1px solid var(--fgfb-border);
    border-radius: 10px;
    box-shadow: var(--fgfb-shadow);
    display: none;
}

.fgfb-widget-panel--right { right: 24px; }
.fgfb-widget-panel--left  { left:  24px; }

.fgfb-widget-panel.is-open {
    display: block;
    animation: fgfb-slide-up .2s ease;
}

@keyframes fgfb-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 420px) {
    .fgfb-widget-panel {
        width: calc(100vw - 32px);
        right: 16px !important;
        left:  16px !important;
    }
}

/* Widget header */
.fgfb-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--fgfb-border);
    background: var(--fgfb-bg);
    border-radius: 10px 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.fgfb-widget-header__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fgfb-text);
    margin: 0;
}

.fgfb-widget-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--fgfb-muted);
    line-height: 1;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color .1s;
}

.fgfb-widget-close:hover {
    color: var(--fgfb-text);
}

/* Widget body */
.fgfb-widget-body {
    padding: 16px;
}

.fgfb-widget-body .fgfb-field {
    margin-bottom: 12px;
}

.fgfb-widget-body .fgfb-label {
    font-size: 12px;
}

.fgfb-widget-body .fgfb-input {
    font-size: 13px;
    padding: 7px 10px;
}

.fgfb-widget-body .fgfb-star {
    font-size: 20px;
}

.fgfb-widget-body .fgfb-textarea {
    min-height: 80px;
}

.fgfb-widget-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--fgfb-border);
    background: var(--fgfb-bg);
    border-radius: 0 0 10px 10px;
    gap: 12px;
}

.fgfb-widget-full-link {
    font-size: 12px;
    color: var(--fgfb-muted);
    text-decoration: none;
    transition: color .1s;
}

.fgfb-widget-full-link:hover {
    color: var(--fgfb-primary);
}

.fgfb-widget-body .fgfb-btn {
    padding: 8px 18px;
    font-size: 13px;
}

.fgfb-widget-body .fgfb-notice {
    font-size: 13px;
    padding: 10px 12px;
}

/* ── Screenshot UI ───────────────────────────────────────────── */

.fgfb-screenshot-field {
    margin-bottom: 16px;
}

.fgfb-screenshot-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fgfb-screenshot-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: transparent;
    border: 1px dashed var(--fgfb-border);
    border-radius: var(--fgfb-radius);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--fgfb-muted);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.fgfb-screenshot-btn:hover:not(:disabled) {
    border-color: var(--fgfb-primary);
    color: var(--fgfb-primary);
    background: rgba(124,59,30,.04);
}

.fgfb-screenshot-btn:disabled {
    opacity: .6;
    cursor: default;
}

.fgfb-screenshot-btn__icon {
    font-size: 15px;
    line-height: 1;
}

.fgfb-screenshot-status {
    font-size: 12px;
    color: var(--fgfb-muted);
    font-style: italic;
}

/* Preview */
.fgfb-screenshot-preview {
    margin-top: 10px;
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.fgfb-screenshot-preview__img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    border: 1px solid var(--fgfb-border);
    border-radius: var(--fgfb-radius);
    object-fit: contain;
    background: #f9f5f0;
}

.fgfb-screenshot-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(44,33,22,.72);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-family: inherit;
    padding: 3px 7px;
    cursor: pointer;
    transition: background .1s;
}

.fgfb-screenshot-remove:hover {
    background: rgba(44,33,22,.9);
}

/* Widget — compact preview */
.fgfb-widget-body .fgfb-screenshot-preview__img {
    max-height: 120px;
}

.fgfb-widget-body .fgfb-screenshot-btn {
    font-size: 12px;
    padding: 6px 12px;
}
