/* EDSM Admin Page Styles */

.semfe-admin-page {
    max-width: 1200px;
}

.semfe-admin-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* Tab Navigation */
.semfe-admin-page .nav-tab-wrapper {
    margin-top: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid #ccd0d4;
}

/* Tab Content */
.semfe-tab-content {
    display: none;
    animation: fadeIn 0.2s ease-in;
}

.semfe-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* CTA Box Outside Tabs */
.semfe-admin-page > .semfe-cta-box {
    margin-top: 20px;
}

.semfe-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 20px;
}

.semfe-card h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.semfe-card h2 .dashicons {
    color: #2271b1;
}

.semfe-card h3 {
    margin-top: 20px;
}

.semfe-category-selection {
    margin: 20px 0;
    padding: 15px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.semfe-select-all {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.semfe-select-all label {
    display: flex;
    font-size: 14px;
	cursor: pointer;
	align-items: center;
}

.semfe-select-all input {
	margin: 0;
	margin-inline-end: .5em;
	align-self: center;
}

.semfe-category-group {
    margin-bottom: 20px;
}

.semfe-category-group h4 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.semfe-category-list {
    display: grid;
    gap: 8px;
}

.semfe-category-item {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.semfe-category-item > span {
	display: flex;
}

.semfe-category-item:hover {
    background: #f0f0f1;
    border-color: #2271b1;
}

.semfe-category-item input[type="checkbox"] {
    margin: 0;
	margin-inline-end: .5em;
	align-self: center;
}

.semfe-category-item strong {
    display: block;
}

.semfe-category-item .description {
    display: block;
    font-size: 12px;
    color: #646970;
}

.semfe-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.semfe-actions .dashicons {
    margin-right: 5px;
}

.semfe-file-upload {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.semfe-file-upload #file-name {
    color: #646970;
    font-style: italic;
}

.semfe-import-preview {
    margin: 20px 0;
    padding: 20px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.semfe-preview-info {
    padding: 15px;
    background: #fff;
    border-left: 4px solid #2271b1;
    margin-bottom: 20px;
}

.semfe-preview-info p {
    margin: 5px 0;
}

.semfe-preview-info ul {
    margin: 10px 0 10px 20px;
}

.semfe-strategy {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 3px;
}

.semfe-strategy input {
	margin: 0;
	margin-inline-end: .5em;
}

.semfe-strategy label {
    display: flex;
	align-items: flex-start;
    cursor: pointer;
}

.semfe-strategy label > span {
    display: flex;
	align-items: center;
}

.semfe-strategy .description {
    display: block;
    font-size: 12px;
    color: #646970;
}

.semfe-status {
    margin: 15px 0;
}

.semfe-status .notice {
    margin: 0;
	margin-top: 20px;
}

.semfe-help {
    background: #f0f6fc;
    border-color: #c3e6ff;
}

.semfe-help h2 .dashicons {
    color: #007cba;
}

.semfe-help ul {
    margin-left: 20px;
}

.semfe-help li {
    margin: 8px 0;
}

/* Loading spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dashicons.spin {
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 782px) {
    .semfe-category-item {
        padding: 8px;
    }

    .semfe-admin-page .nav-tab {
        white-space: nowrap;
    }
}

/* Export button */
#export-btn {
	display: flex;
	align-items: center;
}

/* Import button */
#import-btn {
	display: flex;
	align-items: center;
}


/* PRO badge styles */
.semfe-pro-badge {
	background: #9b59b6;
	color: #fff;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	margin-left: auto;
}

.semfe-pro-category {
	opacity: 0.6;
	cursor: not-allowed;
}

.semfe-pro-category:hover {
	background: #fff;
	border-color: #dcdcde;
}

.semfe-pro-category input[type="checkbox"]:disabled {
	cursor: not-allowed;
}

/* Custom filename input (PRO feature) */
.semfe-filename-option {
	margin-bottom: 20px;
}

.semfe-filename-option label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.semfe-filename-input-wrapper {
	display: flex;
	align-items: center;
	gap: 5px;
	max-width: 600px;
}

.semfe-filename-input-wrapper input {
	flex: 1;
}

.semfe-filename-input-wrapper input:disabled {
	background: #f0f0f0;
	cursor: not-allowed;
}

.semfe-filename-extension {
	color: #666;
	font-family: monospace;
}

.semfe-filename-option .description {
	margin-top: 5px;
	color: #666;
	font-style: italic;
}

/* Description textarea */
.semfe-description-option {
	margin-bottom: 20px;
}

.semfe-description-option label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.semfe-description-option textarea {
	width: 100%;
	resize: vertical;
	min-height: 60px;
}

.semfe-char-counter {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	color: #646970;
}

/* Description preview in import */
.semfe-description-preview {
	white-space: pre-wrap;
	word-wrap: break-word;
	font-family: inherit;
	font-size: 13px;
	margin: 5px 0 10px 0;
	padding: 10px;
	background: #f9f9f9;
	border-left: 3px solid #2271b1;
	border-radius: 0 3px 3px 0;
}

/* PRO CTA Box */
.semfe-cta-box {
	background: linear-gradient(135deg, #f5f0ff 0%, #efe5ff 100%);
	border-color: #9b59b6;
	border-left: 4px solid #9b59b6;
}

.semfe-cta-box h2 {
	color: #7b2d9e;
	border-bottom-color: #d4b8e0;
}

.semfe-cta-features {
	margin: 15px 0 20px 20px;
	list-style: none;
}

.semfe-cta-features li {
	position: relative;
	padding-left: 25px;
	margin: 10px 0;
	color: #1d2327;
}

.semfe-cta-features li::before {
	content: "\f147";
	font-family: dashicons;
	font-size: 20px;
	line-height: 1;
	position: absolute;
	left: 0;
	color: #9b59b6;
}

.semfe-cta-button {
	background: #9b59b6;
	border-color: #7b2d9e;
}

.semfe-cta-button:hover,
.semfe-cta-button:focus {
	background: #7b2d9e;
	border-color: #5b1d7e;
}

/* Network Sites Accordion */
.semfe-network-sites {
	margin: 20px 0;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}

.semfe-network-sites summary {
	padding: 12px 15px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	user-select: none;
	list-style: none;
}

.semfe-network-sites summary::-webkit-details-marker {
	display: none;
}

.semfe-network-sites summary:hover {
	background: #f6f7f7;
}

.semfe-network-sites[open] summary {
	border-bottom: 1px solid #dcdcde;
	background: #f6f7f7;
}

/* Dropdown icon */
.semfe-dropdown-icon {
	color: #646970;
	transition: transform 0.2s ease;
}

.semfe-network-sites[open] .semfe-dropdown-icon {
	transform: rotate(180deg);
}

.semfe-network-sites .semfe-pro-badge {
	margin-left: auto;
}

/* Sites List Container */
.semfe-sites-list {
	max-height: 300px;
	overflow-y: auto;
	padding: 0;
}

.semfe-sites-loading {
	padding: 20px;
	text-align: center;
	color: #646970;
}

.semfe-sites-loading .dashicons {
	margin-right: 8px;
	vertical-align: middle;
}

/* Select All in Sites List */
.semfe-sites-select-all {
	padding: 10px 15px;
	border-bottom: 1px solid #dcdcde;
	background: #f6f7f7;
}

.semfe-sites-select-all label {
	display: flex;
	align-items: center;
	font-weight: 600;
	cursor: pointer;
}

.semfe-sites-select-all input {
	margin: 0;
	margin-inline-end: .5em;
}

/* Individual Site Item */
.semfe-site-item {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	border-bottom: 1px solid #f0f0f1;
	gap: 10px;
}

.semfe-site-item:last-child {
	border-bottom: none;
}

.semfe-site-item:hover {
	background: #f6f7f7;
}

.semfe-site-item label {
	display: flex;
	align-items: center;
	flex: 1;
	cursor: pointer;
	gap: 10px;
}

.semfe-site-item input[type="checkbox"] {
	margin: 0;
}

.semfe-site-item .semfe-site-info {
	flex: 1;
}

.semfe-site-item .semfe-site-name {
	font-weight: 500;
	display: block;
}

.semfe-site-item .semfe-site-url {
	font-size: 12px;
	color: #646970;
	display: block;
}

/* Site disabled (no Elementor) */
.semfe-site-disabled {
	opacity: 0.6;
}

.semfe-site-disabled label {
	cursor: not-allowed;
}

.semfe-site-disabled .semfe-site-warning {
	font-size: 11px;
	color: #996800;
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
}

.semfe-site-disabled .semfe-site-warning .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* PRO locked state */
.semfe-network-sites.semfe-pro-locked {
	opacity: 0.7;
}

.semfe-network-sites.semfe-pro-locked input[type="checkbox"] {
	pointer-events: none;
	cursor: not-allowed;
}

/* No sites message */
.semfe-no-sites {
	padding: 20px;
	text-align: center;
	color: #646970;
	font-style: italic;
}

/* Inline Progress */
.semfe-inline-progress {
	padding: 15px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
}

.semfe-inline-progress h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
}

.semfe-progress-bar {
	height: 8px;
	background: #c3c4c7;
	border-radius: 4px;
	overflow: hidden;
	margin: 10px 0;
}

.semfe-progress-bar-fill {
	height: 100%;
	background: #2271b1;
	transition: width 0.3s ease;
	border-radius: 4px;
}

.semfe-progress-sites {
	margin-top: 15px;
	font-size: 13px;
}

.semfe-progress-sites .semfe-progress-site {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
}

.semfe-progress-site .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.semfe-progress-site.pending .dashicons {
	color: #c3c4c7;
}

.semfe-progress-site.in-progress .dashicons {
	color: #2271b1;
}

.semfe-progress-site.success .dashicons {
	color: #00a32a;
}

.semfe-progress-site.error .dashicons {
	color: #d63638;
}

.semfe-progress-site.skipped .dashicons {
	color: #996800;
}

.semfe-progress-site .site-name {
	flex: 1;
}

.semfe-progress-site .site-error {
	font-size: 12px;
	color: #d63638;
}

/* Inline Progress Actions */
.semfe-progress-actions {
	margin-top: 15px;
	text-align: right;
}

/* Inline Results */
.semfe-inline-results {
	padding: 15px;
	background: #f0f6fc;
	border-left: 4px solid #00a32a;
}

.semfe-inline-results.has-errors {
	border-left-color: #dba617;
}

.semfe-inline-results.cancelled {
	border-left-color: #996800;
}

.semfe-inline-results h4 {
	margin: 0 0 10px 0;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.semfe-inline-results h4 .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.semfe-results-success h4 .dashicons {
	color: #00a32a;
}

.semfe-results-partial h4 .dashicons {
	color: #dba617;
}

.semfe-results-cancelled h4 .dashicons {
	color: #996800;
}