/* ── Frame.io Integration Styles ─────────────────────────────────────────── */
/* v2: Share for Review dropdown + Frame.io project browser modal */

/* ── Export Step Button ───────────────────────────────────────────────────── */

.export-frameio-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #c9d1d9;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.export-frameio-btn:hover {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
    color: #e2e8f0;
}
.export-frameio-btn.frameio-connected {
    border-color: rgba(34,197,94,0.3);
    color: #22c55e;
}
.export-frameio-btn.frameio-connected:hover {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.4);
}
.export-frameio-btn .frameio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4b5563;
    transition: background 0.2s;
}
.export-frameio-btn.frameio-connected .frameio-dot {
    background: #22c55e;
}

/* ── Share Dropdown ───────────────────────────────────────────────────────── */

.share-review-dropdown {
    position: relative;
    display: inline-block;
}

.share-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: shareDropIn 0.15s ease;
}

@keyframes shareDropIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    color: #c9d1d9;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.15s;
}
.share-dropdown-item:hover {
    background: rgba(59,102,241,0.08);
}
.share-dropdown-item:first-child {
    border-radius: 4px 4px 0 0;
}
.share-dropdown-item:last-child {
    border-radius: 0 0 4px 4px;
}
.share-dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Frame.io dot inside the dropdown item */
.share-dropdown-item .frameio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4b5563;
    transition: background 0.2s;
    flex-shrink: 0;
}

/* ── Share dropdown — light mode ──────────────────────────────────────────── */
body:not(.dark-mode) .share-dropdown-menu {
    background: #ffffff;
    border-color: rgba(60,50,30,.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
body:not(.dark-mode) .share-dropdown-item {
    color: #1a1a2e;
}
body:not(.dark-mode) .share-dropdown-item:hover {
    background: rgba(91,77,199,0.06);
}

/* ── Modal overlay ────────────────────────────────────────────────────────── */

.frameio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
    animation: frameioFadeIn 0.2s ease;
}
@keyframes frameioFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.frameio-modal {
    background: #161b22;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    width: 480px;
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: frameioSlideUp 0.25s ease;
}
@keyframes frameioSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.frameio-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.frameio-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
}
.frameio-account-name {
    font-size: 11px;
    color: #7d8590;
}
.frameio-disconnect-btn {
    background: transparent;
    border: none;
    color: #7d8590;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}
.frameio-disconnect-btn:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

/* Breadcrumb */
.frameio-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    font-size: 12px;
    color: #7d8590;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-wrap: wrap;
}
.frameio-crumb {
    cursor: pointer;
    color: #8b5cf6;
    transition: color 0.15s;
}
.frameio-crumb:hover {
    color: #a78bfa;
    text-decoration: underline;
}
.frameio-crumb-active {
    color: #c9d1d9;
    font-weight: 500;
}
.frameio-crumb-sep {
    color: #4b5563;
    margin: 0 2px;
}

/* Modal body */
.frameio-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 200px;
    max-height: 400px;
}

/* Team labels */
.frameio-team-label {
    padding: 10px 20px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7d8590;
}

/* Row items */
.frameio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    color: #c9d1d9;
    font-size: 13px;
    transition: background 0.15s;
}
.frameio-row:hover {
    background: rgba(139,92,246,0.06);
}
.frameio-row svg:first-child {
    flex-shrink: 0;
    opacity: 0.5;
}
.frameio-row span {
    flex: 1;
}
.frameio-chevron {
    opacity: 0.3;
    flex-shrink: 0;
}

/* Upload-here row */
.frameio-row-upload {
    background: rgba(139,92,246,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #8b5cf6;
}
.frameio-row-upload:hover {
    background: rgba(139,92,246,0.12);
}
.frameio-row-upload svg {
    opacity: 1 !important;
    stroke: #8b5cf6;
}

/* Empty state */
.frameio-empty {
    padding: 40px 20px;
    text-align: center;
    color: #7d8590;
    font-size: 13px;
}
.frameio-empty-row {
    padding: 8px 20px;
    color: #4b5563;
    font-size: 12px;
    font-style: italic;
}

/* Loading */
.frameio-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: #7d8590;
    font-size: 13px;
}
.frameio-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(139,92,246,0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: frameioSpin 0.8s linear infinite;
}
@keyframes frameioSpin {
    to { transform: rotate(360deg); }
}

/* Confirm / Upload to folder */
.frameio-confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 30px 20px;
    text-align: center;
}
.frameio-confirm-text {
    color: #c9d1d9;
    font-size: 14px;
    line-height: 1.6;
}
.frameio-confirm-folder {
    color: #8b5cf6;
    font-weight: 600;
}

/* Progress */
.frameio-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
}
.frameio-progress-text {
    color: #c9d1d9;
    font-size: 13px;
}
.frameio-progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}
.frameio-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Result */
.frameio-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
}
.frameio-result-text {
    color: #c9d1d9;
    font-size: 14px;
    line-height: 1.6;
}

/* Error */
.frameio-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #ef4444;
    font-size: 13px;
}

/* Modal footer */
.frameio-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 10px;
}
.frameio-cancel-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #7d8590;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.frameio-cancel-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: #c9d1d9;
}
.frameio-push-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.frameio-push-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.frameio-push-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
