/**
 * Open Graph Tag Generator — Styles
 * Prefix: ogg-
 */

/* ═══════════════════════════════════════════════════════════
   SECTION
═══════════════════════════════════════════════════════════ */
.ogg-section {
    padding: 60px 0 70px;
    background: #FFFFFF;
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════════════════════ */
.ogg-section-header {
    text-align: center;
    margin-bottom: 36px;
}

.ogg-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: #10B981;
    margin-bottom: 14px;
}

.ogg-section-badge i {
    font-size: 1.125rem;
}

.ogg-section-desc {
    font-size: 1.125rem;
    color: var(--text-secondary, #64748B);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.65;
}

.ogg-section-desc code {
    font-size: 1rem;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* ═══════════════════════════════════════════════════════════
   TOOL CARD
═══════════════════════════════════════════════════════════ */
.ogg-card {
    background: #FFFFFF;
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
}

/* ═══════════════════════════════════════════════════════════
   WRAPPER & LAYOUT
═══════════════════════════════════════════════════════════ */
.ogg-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ogg-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.ogg-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ogg-col-hdr {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #64748B);
    margin: 0 0 12px;
}

/* ═══════════════════════════════════════════════════════════
   FORM COLUMN
═══════════════════════════════════════════════════════════ */
.ogg-form-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ogg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ogg-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #1E293B);
    margin: 0;
}

.ogg-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 4px;
    letter-spacing: 0;
}

.ogg-input,
.ogg-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text-primary, #1E293B);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}

.ogg-input:focus,
.ogg-textarea:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.ogg-textarea {
    resize: vertical;
    min-height: 80px;
}

.ogg-hint {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748B);
    margin: 0;
}

/* ── Char row ── */
.ogg-char-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary, #64748B);
}

.ogg-char-limits {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.ogg-char-limit {
    font-size: 0.6875rem;
    padding: 1px 5px;
    border-radius: 4px;
}

.ogg-char-limit--ok {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ogg-char-limit--warn {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

.ogg-char-limit--over {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

/* ── Image preview thumbnail ── */
.ogg-image-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg, #F8FAFC);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 8px;
}

.ogg-image-thumb {
    width: 60px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ogg-image-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ogg-image-dims {
    font-size: 0.6875rem;
    color: var(--text-secondary, #64748B);
}

.ogg-ratio-badge {
    font-size: 0.6875rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ogg-ratio-badge--warn {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
}

/* ── Twitter card radio ── */
.ogg-radio-group {
    display: flex;
    gap: 10px;
}

.ogg-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ogg-radio-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary, #64748B);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.ogg-radio-label input:checked+.ogg-radio-box {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

.ogg-radio-box:hover {
    border-color: #10B981;
}

/* ── Actions ── */
.ogg-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.ogg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
}

.ogg-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.ogg-btn--primary {
    background: #10B981;
    color: #fff;
}

.ogg-btn--primary:hover:not(:disabled) {
    background: #059669;
}

.ogg-btn--ghost {
    background: transparent;
    color: var(--text-secondary, #64748B);
    border: 1px solid var(--border, #E2E8F0);
}

.ogg-btn--ghost:hover {
    border-color: #CBD5E1;
    color: var(--text-primary, #1E293B);
}

/* ═══════════════════════════════════════════════════════════
   PREVIEW COLUMN
═══════════════════════════════════════════════════════════ */
.ogg-preview-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

/* ── Platform tabs ── */
.ogg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ogg-platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 20px;
    background: var(--surface, #fff);
    color: var(--text-secondary, #64748B);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ogg-platform-tab:hover,
.ogg-platform-tab.active {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

/* ── Panels ── */
.ogg-panels-wrap {
    width: 100%;
}

.ogg-panel--hidden {
    display: none;
}

/* ── Shared image placeholder ── */
.ogg-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94A3B8;
    background: #F1F5F9;
    width: 100%;
    padding: 24px 0;
}

.ogg-img-placeholder i {
    font-size: 1.75rem;
}

/* ─── GOOGLE ─── */
.ogg-google-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 12px;
    padding: 20px;
}

.ogg-google-favicon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ogg-google-favicon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 1rem;
    flex-shrink: 0;
}

.ogg-google-domain {
    font-size: 0.875rem;
    color: #202124;
    font-weight: 500;
}

.ogg-google-breadcrumb {
    font-size: 0.75rem;
    color: #4D5156;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.ogg-google-title {
    font-size: 1.1rem;
    color: #1A0DAB;
    font-weight: 400;
    margin-bottom: 4px;
    line-height: 1.4;
}

.ogg-google-desc {
    font-size: 0.875rem;
    color: #4D5156;
    line-height: 1.58;
}

/* ─── FACEBOOK ─── */
.ogg-facebook-card {
    border: 1px solid #CED0D4;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    max-width: 500px;
}

.ogg-facebook-img-wrap {
    width: 100%;
    background: #F0F2F5;
}

.ogg-facebook-img {
    width: 100%;
    height: auto;
    display: block;
}

.ogg-facebook-body {
    padding: 12px;
    background: #F0F2F5;
}

.ogg-facebook-domain {
    font-size: 0.6875rem;
    color: #606770;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ogg-facebook-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1C1E21;
    margin-bottom: 4px;
    line-height: 1.35;
}

.ogg-facebook-desc {
    font-size: 0.875rem;
    color: #606770;
    line-height: 1.35;
}

/* ─── TWITTER/X ─── */
.ogg-twitter-card {
    border: 1px solid #CFD9DE;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    max-width: 500px;
}

.ogg-twitter-img-wrap {
    width: 100%;
    background: #F7F9FA;
}

.ogg-twitter-img {
    width: 100%;
    height: auto;
    display: block;
}

.ogg-twitter-body {
    padding: 12px;
}

.ogg-twitter-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0F1419;
    margin-bottom: 4px;
}

.ogg-twitter-desc {
    font-size: 0.9375rem;
    color: #536471;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ogg-twitter-domain {
    font-size: 0.875rem;
    color: #536471;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Summary card tweak */
.ogg-twitter-card--summary {
    display: flex;
    border-radius: 12px;
}

.ogg-twitter-card--summary .ogg-twitter-img-wrap {
    width: 120px;
    min-width: 120px;
    height: 120px;
    overflow: hidden;
    flex-shrink: 0;
    border-right: 1px solid #CFD9DE;
}

.ogg-twitter-card--summary .ogg-twitter-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ogg-twitter-card--summary .ogg-twitter-body {
    flex: 1;
    min-width: 0;
}

/* ─── LINKEDIN ─── */
.ogg-linkedin-card {
    border: 1px solid #E0E0E0;
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
    max-width: 552px;
}

.ogg-linkedin-img-wrap {
    width: 100%;
    background: #F3F2EF;
}

.ogg-linkedin-img {
    width: 100%;
    height: auto;
    display: block;
}

.ogg-linkedin-body {
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid #E0E0E0;
}

.ogg-linkedin-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 2px;
    line-height: 1.4;
}

.ogg-linkedin-site {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

/* ─── SLACK ─── */
.ogg-slack-card {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    max-width: 520px;
}

.ogg-slack-accent {
    width: 4px;
    min-width: 4px;
    background: #E8912D;
}

.ogg-slack-content {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ogg-slack-site {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1D1C1D;
}

.ogg-slack-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1264A3;
}

.ogg-slack-desc {
    font-size: 0.8125rem;
    color: #616061;
    line-height: 1.46;
}

.ogg-slack-img {
    max-width: 360px;
    width: 100%;
    border-radius: 4px;
    margin-top: 8px;
}

/* ─── DISCORD ─── */
.ogg-discord-card {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    background: #2B2D31;
    max-width: 520px;
}

.ogg-discord-accent {
    width: 4px;
    min-width: 4px;
    background: #5865F2;
}

.ogg-discord-content {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ogg-discord-site {
    font-size: 0.75rem;
    font-weight: 600;
    color: #00AFF4;
}

.ogg-discord-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.ogg-discord-desc {
    font-size: 0.8125rem;
    color: #B5BAC1;
    line-height: 1.4;
}

.ogg-discord-img {
    max-width: 400px;
    width: 100%;
    border-radius: 4px;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════
   VALIDATION STRIP
═══════════════════════════════════════════════════════════ */
.ogg-validation {
    padding: 12px 16px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.05);
}

.ogg-validation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ogg-validation-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.ogg-val--error {
    color: #DC2626;
}

.ogg-val--warn {
    color: #D97706;
}

.ogg-val--info {
    color: #0284C7;
}

/* ═══════════════════════════════════════════════════════════
   CODE SECTION
═══════════════════════════════════════════════════════════ */
.ogg-code-section {
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 12px;
    overflow: hidden;
}

.ogg-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg, #F8FAFC);
    border-bottom: 1px solid var(--border, #E2E8F0);
}

.ogg-code-hdr-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #64748B);
    margin: 0;
}

.ogg-code-pre {
    margin: 0;
    padding: 16px;
    font-size: 0.8125rem;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-primary, #1E293B);
    background: var(--surface, #fff);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.65;
    min-height: 60px;
}

/* ═══════════════════════════════════════════════════════════
   IMAGE UPLOAD
═══════════════════════════════════════════════════════════ */
.ogg-img-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg, #F8FAFC);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 8px;
    padding: 3px;
}

.ogg-img-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary, #64748B);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.ogg-img-tab.active {
    background: #fff;
    color: var(--text-primary, #1E293B);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ogg-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px;
    border: 2px dashed var(--border, #E2E8F0);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.ogg-upload-label:hover {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.03);
}

.ogg-upload-label i {
    font-size: 1.75rem;
    color: var(--text-secondary, #64748B);
}

.ogg-upload-label span {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748B);
}

.ogg-upload-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary, #94A3B8);
}

.ogg-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
.ogg-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1E293B;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 9999;
    white-space: nowrap;
}

.ogg-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .ogg-columns {
        grid-template-columns: 1fr;
    }

    .ogg-preview-col {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 640px) {
    .ogg-field-row {
        grid-template-columns: 1fr;
    }

    .ogg-radio-group {
        flex-wrap: wrap;
    }

    .ogg-tabs {
        gap: 3px;
    }

    .ogg-platform-tab {
        padding: 5px 9px;
    }

    /* Ensure minimum 14px on small screens */
    .ogg-col-hdr,
    .ogg-hint,
    .ogg-char-row,
    .ogg-code-hdr-label {
        font-size: 0.875rem;
    }

    .ogg-badge,
    .ogg-char-limit,
    .ogg-image-dims,
    .ogg-ratio-badge,
    .ogg-upload-hint {
        font-size: 0.875rem;
    }
}