/*
Plugin Name: NeuroContent
Version: 1.0.2
*/

/* from 1.0.2 NeuroContent – Facebook metabox */

.neurocontent-tab-sharing.neurocontent-tab-active     { border-left-color: #ff00ff; }
/* Card */
.neurocontent_fb_card{
	margin-top:14px;
	margin-bottom:10px;
}

/* Checkbox row */
.neurocontent_fb_checkbox{
	display:flex;
	align-items:center;
	gap:10px;
	font-size:13px;
	font-weight:600;
	margin:0;
}

/* Controls: hidden by default (JS will show when checked) */
.neurocontent_fb_controls{
	margin-top:12px; /* spacing between checkbox and controls */
}

/* Grid spacing */
.neurocontent_fb_grid{
	display:grid;
	grid-template-columns:1fr;
	gap:12px; /* margin between the two columns/blocks */
}


/* Field */
.neurocontent_fb_field{
	min-width:0;
}

/* Select should be full width */
.neurocontent_fb_select{
	height:34px;
	border:1px solid #d1d5db;
	border-radius:10px;
	padding:0 10px;
	font-size:13px;
}

/* Segment (radio tabs) */
.neurocontent_fb_segment{
	display:flex;
	border:1px solid #d1d5db;
	border-radius:12px;
	overflow:hidden;
	width:100%;
}

.neurocontent_fb_segment input{
	display:none;
}

.neurocontent_fb_segment label{
	flex:1;
	text-align:center;
	padding:9px 10px;
	font-size:13px;
	font-weight:600;
	cursor:pointer;
	background:#fff;
}

.neurocontent_fb_segment input:checked + label{
	background:#111827;
	color:#fff;
}

/* Schedule wrap spacing */
.neurocontent_fb_schedule_wrap{
	margin-top:10px;
}

/* Datetime input */
.neurocontent_fb_datetime{
	width:100%;
	max-width:100%;
	height:34px;
	border:1px solid #d1d5db;
	border-radius:10px;
	padding:0 10px;
	font-size:13px;
	margin-top:6px;
}

/* Warning: smaller + standout */
.neurocontent_fb_warning{
  font-size: 11px;
  margin-top: 6px;
  color: #b42318;
}

.neurocontent_fb_warning strong{
	font-weight:700;
}

/* Optional: make the whole control row breathe a bit */
.neurocontent_fb_field + .neurocontent_fb_field{
	margin-top:0;
}
/* continue 1.0.1 */
.neurocontent-how {
    font-size: .675rem; /* mai mic, ~14px */
  }
.neurocontent-tab-wrapper {
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 25px;
}
.neurocontent-tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    background-color: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.neurocontent-tab:hover {
    background-color: #fff;
    color: #1e2a78;
}

.neurocontent-tab-active {
    background-color: #fff;
    color: #1e2a78;
    border-left-width: 5px;
    border-left-style: solid;
    border-right: 1px solid #e1e1e1;
}
.np-small-green-description{
	font-size:11px;
	font-weight:400px;
	color:#008000;
}
.neurocontent-tab-settings.neurocontent-tab-active { border-left-color: #1e2a78; }
.neurocontent-tab-triggers.neurocontent-tab-active { border-left-color: #55d2b1; }
.neurocontent-tab-license.neurocontent-tab-active  { border-left-color: #f39c12; }
.neurocontent-tab-logs.neurocontent-tab-active     { border-left-color: #3498db; }
.neurocontent-tab-support.neurocontent-tab-active  { border-left-color: #e74c3c; }
.neurocontent-tab-notifications.neurocontent-tab-active  { border-left-color: #6600ff; }
.neurocontent-tab-analytics.neurocontent-tab-active { border-left-color: #84cc16; }
.np-log-type{
	display:inline-block;padding:.15em .5em;border-radius:4px;font-size:12px;line-height:1.4
}
.np-log-type--success{
	background:#e6f4ea;color:#1e7e34
}
.np-log-type--error{
	background:#fdecea;color:#b71c1c
}
.np-log-type--warning{
	background:#fff8e1;color:#8a6d3b
}
.np-log-type--info{
	background:#e8f0fe;color:#1a73e8
}

#np-soft-overlay{
	position:fixed;
	inset:0;background:rgba(0,0,0,.35);
	z-index:100000;
	display:none;
}
#np-soft-modal{
	position:fixed;
	z-index:100001;
	max-width:680px;
	width:92%;
	left:50%;
	top:22%;
    transform:translateX(-50%);
	background:#fff;
	border:1px solid #ccd0d4;
	border-radius:10px;
    box-shadow:0 12px 28px rgba(0,0,0,.20);
	display:none;
	font:14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#np-soft-modal .hd{
	padding:14px 18px;
	border-bottom:1px solid #eee;
	display:flex;
	align-items:center;
	gap:10px
}
#np-soft-modal .hd .dot{
	width:10px;
	height:10px;
	border-radius:50%;
	background:#d63638
}
#np-soft-modal .hd h2{
	margin:0;
	font-size:16px
}
#np-soft-modal .bd{
	padding:16px 18px
}
#np-soft-modal .lead{
	margin:0;
	color:#d63638;
	font-weight:700
}
#np-soft-modal .ft{
	padding:12px 18px;
	border-top:1px solid #eee;
	text-align:right
}
#np-soft-modal .btn{
	padding:6px 12px;
	border:1px solid #2271b1;
	background:#2271b1;
	color:#fff;
	border-radius:4px;
	cursor:pointer
}
#np-soft-modal .btn:hover{
	background:#135e96;
	border-color:#135e96
}
.neurocontent-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}
.neurocontent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.neurocontent-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 34px;
}
.neurocontent-slider:before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
.neurocontent-switch input:checked + .neurocontent-slider {
  background-color: #28a745; /* verde */
}
.neurocontent-switch input:checked + .neurocontent-slider:before {
  transform: translateX(20px);
}
.notifications{
	border-left-color: #6600ff!important; 
}
.neurocontent-settings {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-left: 5px solid #1e2a78;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: "Segoe UI", Roboto, sans-serif;
}
.neurocontent-settings h1 {
    font-size: 24px;
    color: #1e2a78;
    margin-bottom: 0;
}

.neurocontent-logo {
    font-size: 18px;
    color: #55d2b1;
    margin-bottom: 20px;
}

.neurocontent-settings label {
    font-weight: 600;
    display: block;
}
.neurocontent-image-label{
	font-size:14px;
	font-weight:400;
}
/* Wrapper general (opțional, pentru izolare) */
.hp-fallback-actions { 
  margin-top: 8px;
}

/* Butoane verticale, compacte și aliniate */
.hp-fallback-actions .hp-btn {
  display: block;          /* unul sub altul */
  width: 180px;            /* lățime fixă elegantă */
  margin: 6px 0;           /* spațiere verticală */
  text-align: center;
  padding: 2px 10px;       /* mai mic decât default */
  line-height: 24px;       /* înălțime coerentă */
}

/* Aspect când e disabled (WordPress adaugă disabled pe buton) */
.hp-fallback-actions .hp-btn:disabled,
.hp-fallback-actions .hp-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.neurocontent-settings input[type="text"],
.neurocontent-settings textarea {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    margin-top: 5px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

/* NeuroContent Styles */
.neurocontent-status {
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 4px;
}

.neurocontent-status-loading {
  background-color: #f9f9f9;
  color: #333;
}

.neurocontent-status-success {
  background-color: #d4edda;
  color: #155724;
}

.neurocontent-status-error {
  background-color: #f8d7da;
  color: #721c24;
}

.neurocontent-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: neurocontent-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
.neurocontent-modern-button {
    background-color: #1e87f0;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(30, 135, 240, 0.3);
}

.neurocontent-modern-button:hover {
    background-color: #126ac7;
    box-shadow: 0 4px 8px rgba(30, 135, 240, 0.4);
}

.neurocontent-separator{
	width:100%;
	height:2px;
	background-color:#b3b3b3;
	margin-top:15px;
	margin-bottom:15px;
}
.neurocontent-modal h2 {
    margin-top: 0;
    font-size: 26px;
    font-weight: 600;
    color: #111;
    margin-bottom: 0px;
}

.neurocontent-modal label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 15px;
}

.neurocontent-modal .widefat {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background-color: #fafafa;
    box-sizing: border-box;
}

.neurocontent-modal #image-value-wrapper {
    margin-top: 10px;
}

.neurocontent-modal .modal-footer {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.neurocontent-modal .button {
    padding: 10px 24px;
    font-size: 15px;
    border-radius: 6px;
    font-weight: 500;
}

.neurocontent-modal .button-primary {
    background-color: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.neurocontent-modal .button-secondary {
    background-color: #f3f4f6;
    border-color: #ccc;
    color: #333;
}
.modal-wrapper {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
}

/* Overlay */
.neurocontent-modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Modal */
.neurocontent-modal {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #ffffff;
  padding: 40px;
  width: 600px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1e1e1e;
}

/* === NeuroContent Table General Styling === */
.neurocontent-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
  background-color: #fff;
}
.neurocontent-table th, .neurocontent-table td{
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Table Headers */
.neurocontent-table thead th {
  background-color: #f4f6f8;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
}

/* Table Rows */
.neurocontent-table tbody td {
  padding: 10px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}

/* Zebra striping */
.neurocontent-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.neurocontent-table th:nth-child(1), .neurocontent-table td:nth-child(1) { width: 40px; }   /* Delete */
.neurocontent-table th:nth-child(2), .neurocontent-table td:nth-child(2) { width: 220px; }  /* Trigger ID */
.neurocontent-table th:nth-child(3), .neurocontent-table td:nth-child(3) { width: 120px; }  /* Frequency */
.neurocontent-table th:nth-child(4), .neurocontent-table td:nth-child(4) { width: 170px; }  /* Last run */
.neurocontent-table th:nth-child(5), .neurocontent-table td:nth-child(5) { width: 170px; }  /* Next run */
.neurocontent-table th:nth-child(6), .neurocontent-table td:nth-child(6) { width: 110px; }  /* Status */
.neurocontent-table th:nth-child(7), .neurocontent-table td:nth-child(7) { width: 360px; }  /* Actions */

.neurocontent-table td:nth-child(7) {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Checkbox styling */
.neurocontent-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e87f0;
  cursor: pointer;
  border-radius: 4px;
}

/* Buttons inside table */
.neurocontent-table .neurocontent-button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin: 0 2px;
  cursor: pointer;
}

/* Specific buttons */
.neurocontent-table .neurocontent-button.edit {
  background-color: #55d2b1;
  color: #000;
  border: none;
}

.neurocontent-table .neurocontent-button.edit:hover {
  background-color: #3bb09a;
}

.neurocontent-table .neurocontent-button.run {
  background-color: #f39c12;
  color: #fff;
  border: none;
}

.neurocontent-table .neurocontent-button.run:hover {
  background-color: #d78400;
}
.np-hidden-box{
	padding-left:15px;
}
#neurocontent_ai_image_format_group{
    display:flex;
	justify-content: space-between;
    gap:8px;
    align-items:baseline;
    flex-wrap:nowrap;
    margin:0 0 6px 0;
    font-size:12px;
  }
  /* Ascundem radiourile fără a le scoate din accesibilitate */
  #neurocontent_ai_image_format_group input[type="radio"]{
    position:absolute;
    opacity:0;
    width:0;
    height:0;
    pointer-events:none;
  }
  /* „Pilulele” clicabile */
  #neurocontent_ai_image_format_group label{
    display:inline-flex;
    align-items:center;
    padding:2px 8px;
    border:1px solid #ccd0d4;
    border-radius:3px;
    background:#f6f7f7;
    line-height:1.6;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
  }
  /* Selectat = albastru WordPress */
  #neurocontent_ai_image_format_group input[type="radio"]:checked + label{
    border-color:#2271b1;
    box-shadow:0 0 0 1px #2271b1 inset;
    background:#e9f2ff;
    color:#1d2327;
  }
  /* Focus vizibil pentru tastatură */
  #neurocontent_ai_image_format_group input[type="radio"]:focus + label{
    outline:1px solid #2271b1;
    outline-offset:1px;
  }

  /* Asigură-te că rămân pe un singur rând chiar în metaboxuri înguste */
  @media (max-width: 380px){
    #neurocontent_ai_image_format_group{
      flex-wrap:wrap;
    }
  }
@keyframes neurocontent-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes nc-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.nc-upgrade-banner.nc-animate {
  animation: nc-pulse 0.4s ease-in-out;
}