/**
 * Facebook Vertical Resizer Shared Stylesheet
 * Shared between Facebook Reel Resizer & Facebook Story Resizer
 */

:root {
 --fb-brand: #1877f2;
 --fb-brand-dark: #0f66d6;
 --fb-brand-light: #eff6ff;
 --fb-border: #e2eaf4;
 --fb-text-dark: #0f172a;
 --fb-text-muted: #64748b;
}

.fb-resizer-container {
 width: 100%;
 max-width: 960px;
 margin-inline: auto;
 padding-inline: clamp(12px, 3vw, 24px);
 box-sizing: border-box;
}

/* ──── Workspace Layout ──── */
.reel-workspace-grid {
 display: grid;
 grid-template-columns: 360px minmax(0, 1fr);
 gap: 28px;
 align-items: start;
 width: 100%;
 max-width: 100%;
 box-sizing: border-box;
}

@media (max-width: 860px) {
 .reel-workspace-grid {
 grid-template-columns: minmax(0, 1fr);
 gap: 20px;
 }
}

/* ──── Canvas Stage & Safe Zone ──── */
.reel-stage-card {
 background: #ffffff;
 border: 1px solid var(--fb-border);
 border-radius: 16px;
 padding: 20px;
 display: flex;
 flex-direction: column;
 align-items: center;
 box-shadow: 0 4px 20px rgba(15, 45, 89, 0.04);
}

.reel-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 300px;
 aspect-ratio: 9 / 16;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
}
.reel-canvas-wrapper:active {
 cursor: grabbing;
}

.reel-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

/* Safe Zone Visual Guide Overlay */
.safe-zone-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 border-radius: 14px;
 transition: opacity 0.2s ease;
}

.safe-zone-top {
 height: 14%;
 background: rgba(239, 68, 68, 0.22);
 border-bottom: 2px dashed rgba(239, 68, 68, 0.85);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
 letter-spacing: 0.3px;
 padding: 4px;
 text-align: center;
}

.safe-zone-center {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 1.5px dashed rgba(56, 189, 248, 0.6);
 margin: 6px 10px;
 border-radius: 8px;
 color: rgba(255, 255, 255, 0.85);
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
 pointer-events: none;
}

.safe-zone-bottom {
 height: 20%;
 background: rgba(239, 68, 68, 0.25);
 border-top: 2px dashed rgba(239, 68, 68, 0.85);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
 letter-spacing: 0.3px;
 padding: 4px;
 text-align: center;
}

/* ──── Controls Sidebar ──── */
.reel-controls-container {
 display: flex;
 flex-direction: column;
 gap: 16px;
}

.reel-panel-card {
 background: #ffffff;
 border: 1px solid var(--fb-border);
 border-radius: 16px;
 padding: 22px;
 box-shadow: 0 4px 20px rgba(15, 45, 89, 0.04);
}

.reel-spec-banner {
 background: #eff6ff;
 border: 1px solid #bfdbfe;
 border-radius: 12px;
 padding: 12px 16px;
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 16px;
}
.reel-spec-title {
 font-size: 13.5px;
 font-weight: 800;
 color: #1e40af;
 display: flex;
 align-items: center;
 gap: 6px;
}
.reel-spec-badge {
 background: #1877f2;
 color: #ffffff;
 font-size: 12px;
 font-weight: 700;
 padding: 3px 10px;
 border-radius: 20px;
}

.reel-mode-buttons {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 10px;
 margin-bottom: 18px;
}

.reel-mode-btn {
 padding: 10px 14px;
 min-height: 44px;
 border: 1.5px solid #cbd5e1;
 border-radius: 10px;
 background: #f8fafc;
 color: #334155;
 font-size: 13px;
 font-weight: 700;
 cursor: pointer;
 transition: all 0.2s ease;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
}
.reel-mode-btn:hover {
 border-color: #94a3b8;
 background: #f1f5f9;
}
.reel-mode-btn.active {
 border-color: #1877f2;
 background: #1877f2;
 color: #ffffff;
 box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.control-row {
 margin-bottom: 16px;
}
.control-row-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 8px;
 font-size: 13px;
 font-weight: 700;
 color: #0f2d59;
}

.zoom-slider-wrapper {
 display: flex;
 align-items: center;
 gap: 10px;
}
.zoom-slider-wrapper input[type="range"] {
 flex: 1;
 accent-color: #1877f2;
 height: 6px;
 border-radius: 3px;
 background: #e2e8f0;
 cursor: pointer;
}

.btn-reset-framing {
 background: #ffffff;
 border: 1px solid #cbd5e1;
 border-radius: 6px;
 padding: 3px 8px;
 font-size: 11.5px;
 font-weight: 600;
 color: #475569;
 cursor: pointer;
 transition: all 0.15s;
}
.btn-reset-framing:hover {
 background: #f1f5f9;
 color: #0f172a;
}

/* Letterbox Background Choices */
.color-chips-row {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}
.color-chip {
 width: 28px;
 height: 28px;
 border-radius: 50%;
 border: 2px solid #cbd5e1;
 cursor: pointer;
 transition: transform 0.15s, border-color 0.15s;
}
.color-chip:hover {
 transform: scale(1.1);
}
.color-chip.active {
 border-color: #1877f2;
 box-shadow: 0 0 0 2px #bfdbfe;
}

/* Advanced Drawer */
.adv-toggle-btn {
 background: none;
 border: none;
 padding: 6px 0;
 color: #0f2d59;
 font-size: 13.5px;
 font-weight: 700;
 cursor: pointer;
 display: flex;
 justify-content: space-between;
 width: 100%;
 align-items: center;
 border-top: 1px solid #edf2f7;
 margin-top: 10px;
 padding-top: 12px;
}

.adv-drawer {
 display: none;
 padding-top: 12px;
 border-top: 1px dashed #e2e8f0;
 margin-top: 8px;
}

/* Action Buttons */
.btn-download-primary {
 width: 100%;
 background: #1877f2;
 color: #ffffff;
 border: none;
 border-radius: 12px;
 padding: 14px 20px;
 font-size: 16px;
 font-weight: 800;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 box-shadow: 0 4px 16px rgba(24, 119, 242, 0.35);
 transition: all 0.2s ease;
}
.btn-download-primary:hover {
 background: #0f66d6;
 box-shadow: 0 6px 20px rgba(24, 119, 242, 0.45);
 transform: translateY(-1px);
}
.btn-download-primary:active {
 transform: translateY(0);
}

.btn-secondary {
 background: #f8fafc;
 border: 1px solid #cbd5e1;
 color: #334155;
 border-radius: 10px;
 padding: 10px 16px;
 font-size: 13.5px;
 font-weight: 700;
 cursor: pointer;
 transition: all 0.2s ease;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
}
.btn-secondary:hover {
 background: #f1f5f9;
 color: #0f172a;
 border-color: #94a3b8;
}

/* FAQ Section styling */
.faq-section {
 background: #ffffff;
 border: 1px solid var(--fb-border);
 border-radius: 16px;
 padding: 32px;
 margin-bottom: 36px;
 box-shadow: 0 4px 20px rgba(15, 45, 89, 0.03);
}
.faq-item {
 margin-bottom: 20px;
 padding-bottom: 18px;
 border-bottom: 1px solid #edf2f7;
}
.faq-item:last-child {
 margin-bottom: 0;
 padding-bottom: 0;
 border-bottom: none;
}
.faq-item h3 {
 font-size: 16.5px;
 font-weight: 700;
 color: #0f2d59;
 margin: 0 0 8px 0;
}
.faq-item p {
 font-size: 14.5px;
 color: #475569;
 margin: 0;
 line-height: 1.6;
}

/* ──── Horizontal / Cover Photo Workspace Layout ──── */
.cover-workspace-grid {
 display: grid;
 grid-template-columns: minmax(0, 1fr) 340px;
 gap: 24px;
 align-items: start;
 width: 100%;
 max-width: 100%;
 box-sizing: border-box;
}

@media (max-width: 900px) {
 .cover-workspace-grid {
 grid-template-columns: minmax(0, 1fr);
 gap: 20px;
 }
}

.cover-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 100%;
 aspect-ratio: 820 / 312;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
}
.cover-canvas-wrapper:active {
 cursor: grabbing;
}
.cover-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

/* Desktop vs Mobile Preview Mode Pills */
.preview-mode-pill-group {
 display: inline-flex;
 background: #e2eaf4;
 border-radius: 8px;
 padding: 3px;
 gap: 4px;
}
.preview-mode-pill {
 padding: 6px 14px;
 min-height: 36px;
 border: none;
 border-radius: 6px;
 font-size: 12.5px;
 font-weight: 700;
 cursor: pointer;
 background: transparent;
 color: #5f728d;
 transition: all 0.2s ease;
 display: inline-flex;
 align-items: center;
 gap: 6px;
}
.preview-mode-pill.active {
 background: #ffffff;
 color: #1877f2;
 box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Cover Safe Zone Overlay */
.cover-safe-zone-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 display: flex;
 justify-content: space-between;
 border-radius: 14px;
 transition: opacity 0.2s ease;
}
.cover-trim-left,
.cover-trim-right {
 width: 11%;
 background: rgba(239, 68, 68, 0.22);
 border-right: 2px dashed rgba(239, 68, 68, 0.85);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
 text-align: center;
 padding: 2px;
 writing-mode: vertical-rl;
 transform: rotate(180deg);
}
.cover-trim-right {
 border-right: none;
 border-left: 2px dashed rgba(239, 68, 68, 0.85);
}
.cover-safe-center {
 flex: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: space-between;
 padding: 8px 12px;
 border: 1.5px dashed rgba(56, 189, 248, 0.7);
 margin: 4px;
 border-radius: 8px;
 color: rgba(255, 255, 255, 0.95);
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.cover-avatar-placeholder {
 align-self: flex-start;
 width: 54px;
 height: 54px;
 border-radius: 50%;
 border: 2px dashed rgba(255, 255, 255, 0.75);
 background: rgba(15, 23, 42, 0.45);
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 9px;
 color: #ffffff;
 text-align: center;
 padding: 2px;
}

/* Mobile Preview Framing */
.mobile-view-active .cover-trim-left,
.mobile-view-active .cover-trim-right {
 background: rgba(15, 23, 42, 0.88);
 border-color: rgba(239, 68, 68, 0.95);
}

/* ──── Square Profile Picture Workspace Layout ──── */
.profile-workspace-grid {
 display: grid;
 grid-template-columns: 360px minmax(0, 1fr);
 gap: 28px;
 align-items: start;
 width: 100%;
 max-width: 100%;
 box-sizing: border-box;
}

@media (max-width: 860px) {
 .profile-workspace-grid {
 grid-template-columns: minmax(0, 1fr);
 gap: 20px;
 }
}

.profile-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 320px;
 aspect-ratio: 1 / 1;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
}
.profile-canvas-wrapper:active {
 cursor: grabbing;
}
.profile-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

/* Circular Mask Overlay over Square Canvas */
.profile-circle-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 border-radius: 14px;
 transition: opacity 0.2s ease;
}

/* Live Context Mini-Preview Card */
.profile-context-card {
 width: 100%;
 background: #f8fafc;
 border: 1px solid var(--fb-border);
 border-radius: 12px;
 padding: 12px 14px;
 margin-top: 14px;
 display: flex;
 align-items: center;
 gap: 12px;
}
.profile-avatar-thumb {
 width: 48px;
 height: 48px;
 border-radius: 50%;
 overflow: hidden;
 flex-shrink: 0;
 border: 2px solid #1877f2;
 background: #e2e8f0;
}
.profile-avatar-thumb canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: cover;
}
.profile-context-info {
 font-size: 12px;
 color: #475569;
 line-height: 1.4;
}
.profile-context-title {
 font-weight: 700;
 color: #0f2d59;
 font-size: 13px;
 margin-bottom: 2px;
}

.btn-download-secondary {
 width: 100%;
 background: #f8fafc;
 border: 1.5px solid #cbd5e1;
 color: #0f2d59;
 border-radius: 10px;
 padding: 11px 16px;
 font-size: 13.5px;
 font-weight: 700;
 cursor: pointer;
 transition: all 0.2s ease;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 margin-top: 10px;
}
.btn-download-secondary:hover {
 background: #eff6ff;
 border-color: #1877f2;
 color: #1877f2;
}

/* ──── Facebook Feed Post Resizer Specific Styles ──── */
.post-workspace-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 24px;
 align-items: start;
}
@media (min-width: 900px) {
 .post-workspace-grid {
 grid-template-columns: 1.1fr 1fr;
 gap: 32px;
 }
}

.post-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 440px;
 aspect-ratio: 4 / 5;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
 transition: aspect-ratio 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-canvas-wrapper:active {
 cursor: grabbing;
}
.post-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

.post-canvas-wrapper.ratio-portrait {
 aspect-ratio: 4 / 5;
 max-width: 420px;
}
.post-canvas-wrapper.ratio-square {
 aspect-ratio: 1 / 1;
 max-width: 440px;
}
.post-canvas-wrapper.ratio-landscape {
 aspect-ratio: 1200 / 630;
 max-width: 580px;
}

/* Facebook Feed Post Safe Area / Composition Guide */
.post-safe-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 border-radius: 14px;
 transition: opacity 0.2s ease;
}
.post-safe-inner {
 position: absolute;
 inset: 5%;
 border: 1.5px dashed rgba(56, 189, 248, 0.7);
 border-radius: 6px;
 pointer-events: none;
}
.post-rule-of-thirds {
 position: absolute;
 inset: 0;
 display: grid;
 grid-template-columns: 1fr 1fr 1fr;
 grid-template-rows: 1fr 1fr 1fr;
 pointer-events: none;
}
.post-rule-cell {
 border: 0.5px dashed rgba(255, 255, 255, 0.2);
}

/* Preset Selector Buttons */
.post-presets-grid {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 8px;
 margin-bottom: 6px;
}
.fb-post-preset-btn {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 10px 6px;
 background: #f8fafc;
 border: 2px solid #e2e8f0;
 border-radius: 10px;
 cursor: pointer;
 transition: all 0.2s ease;
 text-align: center;
}
.fb-post-preset-btn:hover {
 border-color: #93c5fd;
 background: #eff6ff;
}
.fb-post-preset-btn.active {
 border-color: #1877f2;
 background: #eff6ff;
 color: #1877f2;
 box-shadow: 0 2px 8px rgba(24, 119, 242, 0.15);
}
.fb-post-preset-btn .preset-icon {
 font-size: 16px;
 margin-bottom: 2px;
}
.fb-post-preset-btn .preset-label {
 font-size: 12.5px;
 font-weight: 700;
 line-height: 1.2;
 margin-bottom: 2px;
}
.fb-post-preset-btn .preset-dims {
 font-size: 10.5px;
 color: #64748b;
 font-weight: 600;
}
.fb-post-preset-btn.active .preset-dims {
 color: #1e40af;
}

/* ──── Facebook Event Cover Resizer Specific Styles ──── */
.event-workspace-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 24px;
 align-items: start;
}
@media (min-width: 900px) {
 .event-workspace-grid {
 grid-template-columns: 1.25fr 1fr;
 gap: 32px;
 }
}

.event-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 680px;
 aspect-ratio: 1920 / 1005;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
}
.event-canvas-wrapper:active {
 cursor: grabbing;
}
.event-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

.event-safe-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 border-radius: 14px;
 transition: opacity 0.2s ease;
 display: flex;
 align-items: center;
 justify-content: center;
}
.event-safe-inner {
 position: absolute;
 inset: 8% 10%;
 border: 1.5px dashed rgba(56, 189, 248, 0.85);
 background: rgba(56, 189, 248, 0.08);
 border-radius: 8px;
 display: flex;
 align-items: flex-end;
 justify-content: center;
 padding-bottom: 8px;
}
.event-safe-label {
 background: rgba(15, 23, 42, 0.75);
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 padding: 3px 10px;
 border-radius: 4px;
 letter-spacing: 0.2px;
}

/* ──── Facebook Ad Image Resize Tool Specific Styles ──── */
.ad-workspace-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 24px;
 align-items: start;
}
@media (min-width: 900px) {
 .ad-workspace-grid {
 grid-template-columns: 1.15fr 1fr;
 gap: 32px;
 }
}

.ad-canvas-wrapper {
 position: relative;
 width: 100%;
 max-width: 440px;
 aspect-ratio: 4 / 5;
 border-radius: 14px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 background: #0f172a;
 cursor: grab;
 user-select: none;
 touch-action: none;
 margin: 0 auto;
 transition: aspect-ratio 0.22s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.ad-canvas-wrapper:active {
 cursor: grabbing;
}
.ad-canvas-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
 object-fit: contain;
}

.ad-canvas-wrapper.ratio-portrait {
 aspect-ratio: 4 / 5;
 max-width: 420px;
}
.ad-canvas-wrapper.ratio-square {
 aspect-ratio: 1 / 1;
 max-width: 440px;
}
.ad-canvas-wrapper.ratio-story {
 aspect-ratio: 9 / 16;
 max-width: 310px;
 max-height: 550px;
}
.ad-canvas-wrapper.ratio-landscape {
 aspect-ratio: 1200 / 628;
 max-width: 580px;
}

/* Preset Buttons Grid (4 presets) */
.ad-presets-grid {
 display: grid;
 grid-template-columns: repeat(2, 1fr);
 gap: 8px;
 margin-bottom: 8px;
}
@media (min-width: 480px) {
 .ad-presets-grid {
 grid-template-columns: repeat(4, 1fr);
 }
}
.fb-ad-preset-btn {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 10px 4px;
 background: #f8fafc;
 border: 2px solid #e2e8f0;
 border-radius: 10px;
 cursor: pointer;
 transition: all 0.2s ease;
 text-align: center;
}
.fb-ad-preset-btn:hover {
 border-color: #93c5fd;
 background: #eff6ff;
}
.fb-ad-preset-btn.active {
 border-color: #1877f2;
 background: #eff6ff;
 color: #1877f2;
 box-shadow: 0 2px 8px rgba(24, 119, 242, 0.15);
}
.fb-ad-preset-btn .preset-icon {
 font-size: 16px;
 margin-bottom: 2px;
}
.fb-ad-preset-btn .preset-label {
 font-size: 11.5px;
 font-weight: 700;
 line-height: 1.2;
 margin-bottom: 2px;
}
.fb-ad-preset-btn .preset-dims {
 font-size: 9.5px;
 color: #64748b;
 font-weight: 600;
}
.fb-ad-preset-btn.active .preset-dims {
 color: #1e40af;
}

/* Safe Area Guide Overlays */
.ad-safe-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 border-radius: 14px;
 transition: opacity 0.2s ease;
}
.ad-safe-center-box {
 position: absolute;
 inset: 0;
}
.ad-safe-margin-box {
 position: absolute;
 inset: 6%;
 border: 1.5px dashed rgba(56, 189, 248, 0.75);
 border-radius: 6px;
 display: flex;
 align-items: flex-end;
 justify-content: center;
 padding-bottom: 6px;
}
.ad-safe-label {
 background: rgba(15, 23, 42, 0.7);
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 padding: 2px 8px;
 border-radius: 4px;
}
.ad-rule-of-thirds {
 position: absolute;
 inset: 0;
 display: grid;
 grid-template-columns: 1fr 1fr 1fr;
 grid-template-rows: 1fr 1fr 1fr;
}
.ad-rule-cell {
 border: 0.5px dashed rgba(255, 255, 255, 0.18);
}

.ad-story-safe-box {
 position: absolute;
 inset: 0;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
}
.ad-story-top-buffer {
 height: 14%;
 background: rgba(239, 68, 68, 0.22);
 border-bottom: 1.5px dashed rgba(239, 68, 68, 0.85);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.ad-story-center {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 1.5px dashed rgba(56, 189, 248, 0.6);
 margin: 6px 8px;
 border-radius: 6px;
 color: rgba(255, 255, 255, 0.85);
 font-size: 10.5px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
 text-align: center;
 padding: 4px;
}
.ad-story-bottom-buffer {
 height: 18%;
 background: rgba(239, 68, 68, 0.22);
 border-top: 1.5px dashed rgba(239, 68, 68, 0.85);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ──── Facebook Image Size Checker Styles ──── */
.checker-workspace-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 24px;
 align-items: start;
 margin-bottom: 32px;
}
@media (min-width: 900px) {
 .checker-workspace-grid {
 grid-template-columns: 1.15fr 1fr;
 gap: 32px;
 }
}

.checker-panel-card {
 background: #ffffff;
 border: 1px solid var(--fb-border, #e2eaf4);
 border-radius: 16px;
 padding: 24px;
 box-shadow: 0 4px 20px rgba(15, 45, 89, 0.04);
}

.checker-panel-title {
 font-size: 17px;
 font-weight: 800;
 color: #0f172a;
 margin: 0 0 16px 0;
 display: flex;
 align-items: center;
 gap: 8px;
}

.checker-info-table {
 width: 100%;
 border-collapse: collapse;
 margin-bottom: 16px;
}
.checker-info-table tr {
 border-bottom: 1px solid #f1f5f9;
}
.checker-info-table tr:last-child {
 border-bottom: none;
}
.checker-info-table td {
 padding: 10px 4px;
 font-size: 13.5px;
}
.checker-info-table .info-label {
 color: #64748b;
 font-weight: 600;
 width: 40%;
}
.checker-info-table .info-value {
 color: #0f172a;
 font-weight: 700;
 text-align: right;
}

.checker-status-banner {
 padding: 16px 18px;
 border-radius: 12px;
 margin-bottom: 20px;
 display: flex;
 align-items: flex-start;
 gap: 12px;
 line-height: 1.5;
}
.checker-status-banner.status-match {
 background: #f0fdf4;
 border: 1.5px solid #86efac;
 color: #166534;
}
.checker-status-banner.status-warning {
 background: #fffbeb;
 border: 1.5px solid #fcd34d;
 color: #92400e;
}
.checker-status-banner.status-info {
 background: #eff6ff;
 border: 1.5px solid #93c5fd;
 color: #1e40af;
}

.checker-status-icon {
 font-size: 20px;
 flex-shrink: 0;
 line-height: 1;
}
.checker-status-title {
 font-weight: 800;
 font-size: 15px;
 margin-bottom: 4px;
}
.checker-status-desc {
 font-size: 13px;
 opacity: 0.95;
}

.checker-preview-stage {
 position: relative;
 width: 100%;
 border-radius: 12px;
 overflow: hidden;
 background: #0f172a;
 margin-top: 14px;
 display: flex;
 align-items: center;
 justify-content: center;
 min-height: 240px;
 max-height: 380px;
}
.checker-preview-stage img,
.checker-preview-stage canvas {
 max-width: 100%;
 max-height: 360px;
 display: block;
 object-fit: contain;
}

.checker-crop-box-overlay {
 position: absolute;
 border: 2px dashed #38bdf8;
 background: rgba(56, 189, 248, 0.12);
 box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
 pointer-events: none;
 transition: all 0.25s ease;
}
.checker-crop-box-overlay.is-circle {
 border-radius: 50%;
}

.checker-cta-card {
 background: #eff6ff;
 border: 1.5px solid #bfdbfe;
 border-radius: 12px;
 padding: 16px 18px;
 margin-top: 16px;
 text-align: center;
}
.checker-cta-text {
 font-size: 13px;
 color: #1e40af;
 font-weight: 600;
 margin-bottom: 10px;
}
.checker-cta-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 10px 20px;
 background: #1877f2;
 color: #ffffff;
 font-size: 13.5px;
 font-weight: 700;
 border-radius: 8px;
 text-decoration: none;
 transition: all 0.2s ease;
 box-shadow: 0 2px 8px rgba(24, 119, 242, 0.2);
}
.checker-cta-btn:hover {
 background: #166fe5;
 box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
 color: #ffffff;
}

@keyframes spin {
 0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

/* ──── Facebook Cover Photo Size Checker Styles ──── */
.cover-dual-preview-grid {
 display: grid;
 grid-template-columns: 1fr;
 gap: 20px;
 margin-top: 16px;
}
@media (min-width: 900px) {
 .cover-dual-preview-grid {
 grid-template-columns: 1fr;
 }
}

.cover-preview-card {
 background: #ffffff;
 border: 1px solid var(--fb-border, #e2eaf4);
 border-radius: 14px;
 padding: 16px;
 box-shadow: 0 2px 12px rgba(15, 45, 89, 0.03);
}
.cover-preview-card-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 10px;
 font-size: 13px;
 font-weight: 700;
 color: #0f2d59;
 flex-wrap: wrap;
 gap: 6px;
}
.cover-preview-card-badge {
 background: #eff6ff;
 color: #1877f2;
 padding: 3px 8px;
 border-radius: 6px;
 font-size: 11.5px;
 font-weight: 600;
}

.cover-preview-frame {
 position: relative;
 width: 100%;
 background: #0f172a;
 border-radius: 10px;
 overflow: hidden;
 display: flex;
 align-items: center;
 justify-content: center;
 box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.cover-preview-frame.desktop-frame {
 aspect-ratio: 851 / 315;
 max-height: 280px;
}

.cover-preview-frame.mobile-frame {
 aspect-ratio: 640 / 360;
 max-width: 480px;
 margin: 0 auto;
 max-height: 270px;
}

.cover-preview-frame canvas,
.cover-preview-frame img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

/* Composition Guides */
.cover-comp-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 transition: opacity 0.2s ease;
}

.cover-desktop-guide {
 position: absolute;
 inset: 0;
 border: 2px dashed rgba(56, 189, 248, 0.65);
 background: rgba(56, 189, 248, 0.05);
 pointer-events: none;
}
.cover-desktop-center-guide {
 position: absolute;
 top: 5%;
 bottom: 5%;
 left: 12.5%;
 right: 12.5%;
 border: 1.5px dashed #22c55e;
 background: rgba(34, 197, 94, 0.06);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.cover-desktop-avatar-guide {
 position: absolute;
 bottom: 8%;
 left: 4%;
 width: 18%;
 aspect-ratio: 1 / 1;
 border-radius: 50%;
 border: 2px dashed #f59e0b;
 background: rgba(245, 158, 11, 0.25);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 9px;
 font-weight: 700;
 text-align: center;
 padding: 2px;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cover-mobile-guide {
 position: absolute;
 inset: 0;
 border: 2px dashed #38bdf8;
 background: rgba(56, 189, 248, 0.05);
 pointer-events: none;
}
.cover-mobile-center-guide {
 position: absolute;
 inset: 8%;
 border: 1.5px dashed #22c55e;
 background: rgba(34, 197, 94, 0.06);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.cover-mobile-avatar-guide {
 position: absolute;
 bottom: 10%;
 left: 6%;
 width: 24%;
 aspect-ratio: 1 / 1;
 border-radius: 50%;
 border: 2px dashed #f59e0b;
 background: rgba(245, 158, 11, 0.25);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 9px;
 font-weight: 700;
 text-align: center;
 padding: 2px;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Manual Dimension Form */
.cover-manual-form {
 display: flex;
 gap: 10px;
 align-items: flex-end;
 flex-wrap: wrap;
 background: #f8fafc;
 border: 1px solid var(--fb-border, #e2eaf4);
 border-radius: 12px;
 padding: 16px;
 margin-top: 14px;
}
.cover-manual-field {
 flex: 1;
 min-width: 110px;
}
.cover-manual-field label {
 display: block;
 font-size: 12px;
 font-weight: 700;
 color: #0f2d59;
 margin-bottom: 5px;
}
.cover-manual-field input {
 width: 100%;
 padding: 8px 12px;
 font-size: 13.5px;
 border: 1px solid #cbd5e1;
 border-radius: 8px;
 background: #ffffff;
 color: #0f172a;
 box-sizing: border-box;
}
.cover-manual-btn {
 padding: 9px 18px;
 background: #1877f2;
 color: #ffffff;
 font-size: 13px;
 font-weight: 700;
 border: none;
 border-radius: 8px;
 cursor: pointer;
 transition: background 0.2s ease;
}
.cover-manual-btn:hover {
 background: #166fe5;
}

/* ──── Facebook Reel Cover Image Resizer Styles ──── */
.reel-cover-context-card {
 width: 100%;
 background: #f8fafc;
 border: 1px solid var(--fb-border, #e2eaf4);
 border-radius: 14px;
 padding: 14px 16px;
 margin-top: 16px;
 display: flex;
 align-items: center;
 gap: 16px;
 flex-wrap: wrap;
}
.reel-cover-preview-thumbs {
 display: flex;
 align-items: center;
 gap: 12px;
}
.reel-cover-thumb-box {
 text-align: center;
}
.reel-cover-thumb-label {
 font-size: 11px;
 font-weight: 700;
 color: #64748b;
 margin-bottom: 4px;
}
.reel-cover-thumb-916 {
 width: 48px;
 height: 85px;
 border-radius: 6px;
 overflow: hidden;
 border: 1.5px solid #1877f2;
 background: #0f172a;
 box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.reel-cover-thumb-916 canvas {
 width: 100%;
 height: 100%;
 display: block;
}
.reel-cover-thumb-grid {
 width: 60px;
 height: 60px;
 border-radius: 6px;
 overflow: hidden;
 border: 1.5px solid #10b981;
 background: #0f172a;
 box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
.reel-cover-thumb-grid canvas {
 width: 100%;
 height: 100%;
 display: block;
}
.reel-cover-context-info {
 flex: 1;
 min-width: 200px;
}
.reel-cover-context-title {
 font-size: 13.5px;
 font-weight: 800;
 color: #0f2d59;
 margin-bottom: 3px;
}
.reel-cover-context-desc {
 font-size: 12px;
 color: #64748b;
 line-height: 1.4;
 margin: 0;
}

/* Enhanced Reel Cover Composition Overlay */
.reel-cover-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
}
.reel-cover-top-ui {
 height: 15%;
 background: rgba(239, 68, 68, 0.18);
 border-bottom: 2px dashed rgba(239, 68, 68, 0.8);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10.5px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
 padding: 0 8px;
 text-align: center;
}
.reel-cover-center-safe {
 flex: 1;
 position: relative;
 display: flex;
 align-items: center;
 justify-content: center;
}
.reel-cover-grid-box {
 width: 88%;
 aspect-ratio: 1 / 1;
 border: 2px dashed #10b981;
 background: rgba(16, 185, 129, 0.08);
 border-radius: 8px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
 text-align: center;
 padding: 8px;
}
.reel-cover-bottom-ui {
 height: 25%;
 background: rgba(239, 68, 68, 0.18);
 border-top: 2px dashed rgba(239, 68, 68, 0.8);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10.5px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
 padding: 0 8px;
 text-align: center;
}

/* ──── Facebook Post Size Checker Styles ──── */
.post-formats-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 gap: 16px;
 margin-bottom: 24px;
}

.post-format-card {
 background: #ffffff;
 border: 1.5px solid var(--fb-border, #e2eaf4);
 border-radius: 14px;
 padding: 16px;
 cursor: pointer;
 transition: all 0.2s ease;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
}
.post-format-card:hover {
 border-color: #93c5fd;
 box-shadow: 0 4px 14px rgba(24, 119, 242, 0.08);
}
.post-format-card.active {
 border-color: var(--fb-brand, #1877f2);
 background: #f8fbff;
 box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.post-format-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 8px;
}
.post-format-title {
 font-size: 14px;
 font-weight: 800;
 color: #0f2d59;
}
.post-format-ratio-badge {
 background: #eff6ff;
 color: #1877f2;
 padding: 2px 8px;
 border-radius: 6px;
 font-size: 11.5px;
 font-weight: 700;
}
.post-format-dims {
 font-size: 13px;
 color: #475569;
 margin-bottom: 10px;
}
.post-format-status-badge {
 display: inline-flex;
 align-items: center;
 gap: 5px;
 font-size: 12px;
 font-weight: 700;
 padding: 4px 10px;
 border-radius: 6px;
 width: fit-content;
}
.status-badge-match {
 background: #dcfce7;
 color: #15803d;
}
.status-badge-warning {
 background: #fef3c7;
 color: #b45309;
}
.status-badge-crop {
 background: #fee2e2;
 color: #b91c1c;
}
.status-badge-info {
 background: #eff6ff;
 color: #1d4ed8;
}

/* Post Checker Interactive Stage */
.post-preview-stage-container {
 position: relative;
 background: #0f172a;
 border-radius: 14px;
 overflow: hidden;
 margin: 0 auto 16px auto;
 display: flex;
 align-items: center;
 justify-content: center;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
 user-select: none;
 touch-action: none;
 cursor: grab;
}
.post-preview-stage-container:active {
 cursor: grabbing;
}
.post-preview-stage-container canvas {
 display: block;
 max-width: 100%;
 max-height: 480px;
}

/* Post Composition Guide Overlay */
.post-comp-guide-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 border-radius: 14px;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
}
.post-guide-edge {
 height: 10%;
 background: rgba(239, 68, 68, 0.15);
 border-bottom: 1.5px dashed rgba(239, 68, 68, 0.7);
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 display: flex;
 align-items: center;
 justify-content: center;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
 padding: 0 6px;
}
.post-guide-bottom-edge {
 height: 10%;
 background: rgba(239, 68, 68, 0.15);
 border-top: 1.5px dashed rgba(239, 68, 68, 0.7);
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 display: flex;
 align-items: center;
 justify-content: center;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
 padding: 0 6px;
}
.post-guide-center {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 1.5px dashed rgba(56, 189, 248, 0.6);
 margin: 4px 8px;
 border-radius: 8px;
 color: rgba(255, 255, 255, 0.9);
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
 text-align: center;
 padding: 4px;
}

/* Mobile Feed Simulator */
.mobile-feed-simulator {
 background: #f8fafc;
 border: 1px solid #e2e8f0;
 border-radius: 16px;
 padding: 18px;
 margin-top: 24px;
}
.feed-sim-header {
 font-size: 13.5px;
 font-weight: 800;
 color: #0f2d59;
 margin-bottom: 14px;
 display: flex;
 align-items: center;
 justify-content: space-between;
}
.feed-sim-comparisons {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 12px;
}
@media (max-width: 640px) {
 .feed-sim-comparisons {
 grid-template-columns: 1fr;
 }
}
.feed-sim-card {
 background: #ffffff;
 border: 1px solid #e2e8f0;
 border-radius: 10px;
 padding: 12px 10px;
 text-align: center;
}
.feed-sim-screen {
 background: #f1f5f9;
 border: 1.5px solid #cbd5e1;
 border-radius: 8px;
 height: 180px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 margin: 0 auto 10px auto;
 overflow: hidden;
 position: relative;
 padding: 6px;
 box-sizing: border-box;
}
.feed-sim-post-box {
 background: #1877f2;
 border-radius: 4px;
 width: 100%;
 transition: all 0.3s ease;
 display: flex;
 align-items: center;
 justify-content: center;
 color: #ffffff;
 font-size: 10px;
 font-weight: 700;
 box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}
.feed-sim-title {
 font-size: 12px;
 font-weight: 700;
 color: #0f2d59;
 margin-bottom: 3px;
}
.feed-sim-desc {
 font-size: 11px;
 color: #64748b;
 line-height: 1.35;
}

/* ──── Facebook Profile Picture Size Checker Styles ──── */
.profile-checker-stage-wrapper {
 position: relative;
 width: 100%;
 max-width: 320px;
 aspect-ratio: 1 / 1;
 margin: 0 auto 16px auto;
 background: #0f172a;
 border-radius: 16px;
 overflow: hidden;
 box-shadow: 0 8px 30px rgba(15, 23, 42, 0.18);
 user-select: none;
 touch-action: none;
 cursor: grab;
}
.profile-checker-stage-wrapper:active {
 cursor: grabbing;
}
.profile-checker-stage-wrapper canvas {
 width: 100%;
 height: 100%;
 display: block;
}

/* Circular Mask Overlay showing corner cutoffs */
.profile-circle-mask-overlay {
 position: absolute;
 inset: 0;
 pointer-events: none;
 box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.68);
 border-radius: 50%;
 border: 2px dashed #38bdf8;
 transition: all 0.2s ease;
}

.profile-circle-guide-overlay {
 position: absolute;
 inset: 15%;
 border: 1.5px dashed rgba(255, 255, 255, 0.55);
 border-radius: 50%;
 pointer-events: none;
 display: flex;
 align-items: center;
 justify-content: center;
 color: rgba(255, 255, 255, 0.9);
 font-size: 11px;
 font-weight: 700;
 text-shadow: 0 1px 3px rgba(0,0,0,0.8);
 text-align: center;
 padding: 8px;
}

/* Multi-size avatar previews grid */
.avatar-sizes-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
 gap: 14px;
 margin-top: 18px;
}
.avatar-size-card {
 background: #f8fafc;
 border: 1px solid #e2e8f0;
 border-radius: 12px;
 padding: 14px 10px;
 text-align: center;
 display: flex;
 flex-direction: column;
 align-items: center;
}
.avatar-size-canvas-box {
 border-radius: 50%;
 overflow: hidden;
 background: #0f172a;
 box-shadow: 0 2px 8px rgba(0,0,0,0.15);
 margin-bottom: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
}
.avatar-size-canvas-box canvas {
 display: block;
 border-radius: 50%;
}
.avatar-size-label {
 font-size: 12px;
 font-weight: 700;
 color: #0f2d59;
 margin-bottom: 2px;
}
.avatar-size-sub {
 font-size: 11px;
 color: #64748b;
}

/* Small Avatar Readability Diagnostic Card */
.readability-check-card {
 background: #f0fdf4;
 border: 1.5px solid #bbf7d0;
 border-radius: 14px;
 padding: 16px;
 margin-top: 20px;
 display: flex;
 gap: 14px;
 align-items: flex-start;
}
.readability-check-card.warning {
 background: #fffbeb;
 border-color: #fde68a;
}
.readability-avatar-wrap {
 width: 44px;
 height: 44px;
 border-radius: 50%;
 overflow: hidden;
 flex-shrink: 0;
 background: #0f172a;
 box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.readability-avatar-wrap canvas {
 width: 100%;
 height: 100%;
 display: block;
}
.readability-content h4 {
 font-size: 13.5px;
 font-weight: 800;
 color: #166534;
 margin: 0 0 4px 0;
}
.readability-check-card.warning .readability-content h4 {
 color: #92400e;
}
.readability-content p {
 font-size: 12px;
 color: #475569;
 margin: 0;
 line-height: 1.45;
}




