/* Metabox top bar */
.sp-metabox-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0 12px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 12px;
	flex-wrap: wrap;
	gap: 8px;
}
.sp-metabox-topbar__left {
	display: flex;
	align-items: center;
	gap: 12px;
}
.sp-metabox-topbar__right {
	display: flex;
	align-items: center;
	gap: 8px;
}
.sp-topbar-profile {
	font-weight: 600;
	font-size: 13px;
}
.sp-topbar-status {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 12px;
}
.sp-topbar-status--published {
	background: #dcfce7;
	color: #166534;
}
.sp-topbar-status--pending {
	background: #f3f4f6;
	color: #6b7280;
}
.sp-metabox-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.sp-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 12px 0;
}
.sp-ai-row {
	display: flex;
	gap: 8px;
	margin: 6px 0;
}
.sp-ai-row select {
	flex: 1;
}
.sp-rewrite-output {
	margin-top: 8px;
	border: 1px solid #e5e7eb;
	padding: 10px;
	background: #fafafa;
	border-radius: 4px;
}
.sp-rewrite-output strong {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
}
.sp-rewrite-output button {
	margin-top: 8px;
}

/* LinkedIn Fields Metabox */
.sp-fields-wrap {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}
.sp-fields-col {
	flex: 1;
}
.sp-fields-col--image {
	flex: 0 0 20%;
}
.sp-fields-col--text {
	flex: 0 0 40%;
}
.sp-fields-col--preview {
	flex: 0 0 38%;
}
.sp-fields-label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 13px;
}
.sp-fields-desc {
	font-size: 12px;
	color: #666;
	margin: 0 0 8px;
}
.sp-fields-textarea {
	width: 100%;
	resize: vertical;
	font-size: 13px;
}
.sp-media-preview {
	margin-bottom: 8px;
	min-height: 40px;
}
.sp-media-preview img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	border: 1px solid #ddd;
}
.sp-pdf-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	background: #f0f4f8;
	border: 1px solid #ccd6e0;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}
.sp-media-buttons {
	display: flex;
	gap: 4px;
}
.sp-fields-notice {
	background: #f3f4f6;
	border: 1px solid #ddd;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 13px;
	margin-bottom: 12px;
	color: #555;
}
.sp-linkedin-preview {
	max-width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	min-height: 60px;
	padding: 4px;
}

/* LinkedIn Preview Card */
.sp-lk-card {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	color: rgba(0,0,0,0.9);
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	max-width: 100%;
}
.sp-lk-header {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 12px 12px 0;
}
.sp-lk-avatar-wrap {
	flex-shrink: 0;
}
.sp-lk-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}
.sp-lk-avatar--placeholder {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0A66C2 0%, #004182 100%);
}
.sp-lk-profile {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1px;
}
.sp-lk-name {
	font-weight: 600;
	font-size: 14px;
	color: rgba(0,0,0,0.9);
	line-height: 1.3;
}
.sp-lk-tagline {
	font-size: 12px;
	color: rgba(0,0,0,0.6);
	line-height: 1.3;
}
.sp-lk-meta {
	font-size: 11px;
	color: rgba(0,0,0,0.4);
	display: flex;
	align-items: center;
	gap: 3px;
}
.sp-lk-globe {
	color: rgba(0,0,0,0.4);
	vertical-align: middle;
}
.sp-lk-follow {
	background: none;
	border: none;
	color: #0A66C2;
	font-weight: 600;
	font-size: 14px;
	cursor: default;
	white-space: nowrap;
	padding: 0;
}
.sp-lk-text {
	padding: 10px 12px 0;
	line-height: 1.5;
	font-size: 14px;
}
.sp-lk-text p {
	margin: 0 0 6px;
}
.sp-lk-placeholder {
	color: rgba(0,0,0,0.35);
	font-style: italic;
}
.sp-lk-char-count {
	padding: 4px 12px;
	font-size: 11px;
	color: rgba(0,0,0,0.4);
	text-align: right;
}
.sp-lk-char-over {
	color: #cc1016;
	font-weight: 600;
}
.sp-lk-media-wrap {
	margin-top: 8px;
}
.sp-lk-image {
	width: 100%;
	aspect-ratio: 1.91 / 1;
	object-fit: cover;
	display: block;
}
.sp-lk-pdf {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f3f6f8;
	border-top: 1px solid #e0e0e0;
}
.sp-lk-pdf-icon {
	font-size: 28px;
	line-height: 1;
}
.sp-lk-pdf strong {
	display: block;
	font-size: 13px;
	font-weight: 600;
}
.sp-lk-pdf span {
	font-size: 11px;
	color: rgba(0,0,0,0.5);
}
.sp-lk-reactions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-top: 1px solid #e0e0e0;
	margin-top: 8px;
}
.sp-lk-reaction-icons {
	display: flex;
	gap: 2px;
}
.sp-lk-reaction-icon {
	font-size: 16px;
	line-height: 1;
}
.sp-lk-reaction-label {
	font-size: 11px;
	color: rgba(0,0,0,0.5);
}

.linkedin-text-preview {
    padding: 15px;
}
.linkedin-image-preview {
    width: auto; 
    height: auto; 
    margin-top: 15px;
}
.socipu-meta-box {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.socipu-meta-success {
    color: #22863a;
    font-weight: 600;
    margin-bottom: 8px;
}

.socipu-icon {
    margin-right: 4px;
}

.socipu-meta-republish {
    display: block;
    margin-top: 6px;
}

.socipu-meta-warning {
    color: orange;
}

.sp-box {
    background: #fff;
    border-radius: 12px;
    /* padding: 20px; */
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); */
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.sp-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.sp-row {
    /* display: flex; */
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.sp-row.d-flex {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.sp-box hr {
    margin: 10px 0;
    border-bottom: 1px solid #c7c4ee;
}

.sp-row.cal input {
    width: 100%;
    height: 42px;
}

hr.m-20-10 {
    margin: 20px 0 10px;
}

.sp-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin-right: 8px;
}

.sp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sp-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.2s;
}

.sp-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.sp-switch input:checked + .slider {
    background-color: #4338ca;
}

.sp-switch input:disabled + .slider {
    background-color: #c7c4ee;
    cursor: not-allowed;
}

.sp-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.sp-button-blue {
    background-color: #4338ca;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}
.sp-button-blue:hover {
    background-color: #6366f1; /* blue-600 */
}

.social-publisher-settings {
    padding: 20px;
    background: white;
}

.social-publisher-settings .button-primary {
    background-color: #4338ca;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.social-publisher-settings .button-primary:hover {
    background-color: #312e81;
}

/* Pro locked / upsell elements */
.sp-pro-locked {
	background: #f9f9fb;
	border: 1px dashed #c7c4ee;
	border-radius: 6px;
	padding: 8px 10px;
	opacity: 0.85;
}
.sp-pro-locked__label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}
.sp-pro-locked__hint {
	font-size: 12px;
	color: #777;
	margin: 0;
}
.sp-pro-locked__hint a {
	color: #4338ca;
	font-weight: 600;
	text-decoration: none;
}
.sp-pro-locked__hint a:hover {
	text-decoration: underline;
}
.sp-pro-badge {
	display: inline-block;
	background: linear-gradient(135deg, #4338ca, #6366f1);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 3px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	vertical-align: middle;
}

.toggle-visibility {
    cursor: pointer;
    margin-left: 6px;
    user-select: none;
}

.toggle-visibility.openai {
    margin-left: 10px;
}

.toggle-visibility::after {
    content: "👁️";
}

.toggle-visibility[data-visible="false"]::after {
    content: "🙈";
}