/* ===== Generator Cover Image - seotoolpro.ro ===== */

.cig-app {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cig-section { margin-bottom: 18px; }
.cig-section-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Format selector */
.cig-formats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 600px) { .cig-formats { grid-template-columns: 1fr; } }
.cig-format {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cig-format:hover { background: #f3f4f6; border-color: #d1d5db; }
.cig-format.active { border-color: #2563eb; background: #eff6ff; }
.cig-format-icon {
    width: 50px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 4px;
    margin-bottom: 6px;
}
.cig-format strong { font-size: 13px; color: #111827; }
.cig-format span { font-size: 11px; color: #2563eb; font-weight: 600; }
.cig-format small { font-size: 10px; color: #6b7280; }

/* Templates selector */
.cig-templates {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
@media (max-width: 900px) { .cig-templates { grid-template-columns: repeat(3, 1fr); } }
.cig-tpl {
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.cig-tpl:hover { border-color: #93c5fd; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,99,235,0.12); }
.cig-tpl.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
.cig-tpl canvas { width: 100%; height: auto; display: block; background: #fff; }
.cig-tpl-name {
    font-size: 10px;
    text-align: center;
    padding: 5px 2px;
    color: #374151;
    font-weight: 700;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    letter-spacing: 0.02em;
}
.cig-tpl.active .cig-tpl-name { color: #2563eb; background: #eff6ff; }

/* =============================================
   LAYOUT PRINCIPAL: editor scroll + preview fix
   ============================================= */
.cig-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 22px;
    margin-top: 8px;
    align-items: start;
}
@media (max-width: 900px) { .cig-grid { grid-template-columns: 1fr; } }

/* Coloana editor - scroll intern */
.cig-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}
.cig-editor::-webkit-scrollbar { width: 5px; }
.cig-editor::-webkit-scrollbar-track { background: #f9fafb; border-radius: 10px; }
.cig-editor::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
.cig-editor::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Coloana preview - sticky */
.cig-preview-col {
    position: sticky;
    top: 12px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (max-width: 900px) {
    .cig-preview-col { position: static; }
    .cig-editor { max-height: none; overflow: visible; padding-right: 0; }
}

.cig-preview-box {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 55vh;
}
.cig-preview-box #cig-canvas { max-height: 53vh; width: auto; max-width: 100%; }
#cig-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
}
.cig-preview-info {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

/* Fields */
.cig-field { display: flex; flex-direction: column; gap: 5px; }
.cig-field > label { font-size: 13px; font-weight: 600; color: #374151; }
.cig-field input[type="text"],
.cig-field select,
.cig-field input[type="file"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
}
.cig-field input:focus, .cig-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.cig-field input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 3px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
}
.cig-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cig-bgtype { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0; }
.cig-bgtype label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; cursor: pointer; }
.cig-hint { font-size: 11px; color: #6b7280; font-weight: normal; }

/* Presets palete */
.cig-presets {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
}
.cig-presets > strong {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.cig-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cig-preset {
    padding: 8px 4px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.cig-preset:hover { transform: translateY(-1px); }
.cig-preset.light-preset { text-shadow: none; border-color: #e5e7eb; }

/* Sliders */
.cig-sliders { display: flex; flex-direction: column; gap: 6px; }
.cig-slider-row { display: grid; grid-template-columns: 60px 1fr 50px; gap: 8px; align-items: center; }
.cig-slider-row > span:first-child { font-size: 12px; color: #374151; font-weight: 600; }
.cig-slider-row input[type="range"] { width: 100%; accent-color: #2563eb; }
.cig-slider-val { font-size: 11px; color: #2563eb; font-weight: 700; text-align: right; }

/* Icon picker */
.cig-icon-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.cig-icon-controls .cig-btn-small { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; margin-top: 0; }
.cig-icon-controls .cig-btn-small:hover { background: #dbeafe; }
.cig-icon-controls .cig-btn-clear { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.cig-icon-controls .cig-btn-clear:hover { background: #fecaca; }
.cig-icon-picker {
    margin-top: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.cig-icon-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
@media (max-width: 600px) { .cig-icon-grid { grid-template-columns: repeat(7, 1fr); } }
.cig-icon-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
    padding: 4px;
}
.cig-icon-item:hover { border-color: #2563eb; background: #eff6ff; transform: scale(1.05); }
.cig-icon-item.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.cig-icon-item svg { width: 100%; height: 100%; display: block; }
.cig-icon-options {
    margin-top: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Download */
.cig-download { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cig-btn {
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.cig-btn-primary { background: #2563eb; color: #fff; }
.cig-btn-primary:hover { background: #1d4ed8; }
.cig-btn-secondary { background: #10b981; color: #fff; }
.cig-btn-secondary:hover { background: #059669; }
.cig-btn-small {
    padding: 5px 10px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 6px;
    align-self: flex-start;
}
.cig-btn-small:hover { background: #fecaca; }

.cig-info {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}
