/**
 * Admin styles
 *
 * @package    MPSEO
 * @subpackage MPSEO/assets/css
 */

/* General Admin Styles */
.mpseo-admin {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}


/* Plugin Header */
.mpseo-header {
	background: #fff;
	border-bottom: 1px solid #ddd;
	padding: 20px;
	margin: 0 -20px 20px -20px;
}

.mpseo-header h1 {
	font-size: 28px;
	font-weight: 600;
	color: #23282d;
	margin: 0;
}

/* Navigation Tabs */
.nav-tab-wrapper {
	margin: 20px 0;
	border-bottom: 1px solid #ccc;
}

.nav-tab {
	font-size: 14px;
	padding: 10px 15px;
	text-decoration: none;
}

.nav-tab-active {
	background: #fff;
	border-bottom: 1px solid #fff;
}

.tab-content {
    display: block !important;
}

/* Form Tables */
.form-table th {
	width: 200px;
	padding: 20px 10px 20px 0;
	font-weight: 600;
}

.form-table td {
	padding: 15px 10px;
}

.form-table .description {
	color: #666;
	font-style: italic;
	margin-top: 5px;
}

/* Buttons */
.button-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	text-shadow: none;
	box-shadow: none;
}

.button-primary:hover,
.button-primary:focus {
	background: #135e96;
	border-color: #135e96;
}

.button-secondary {
	color: #2271b1;
	border-color: #2271b1;
}

.button-secondary:hover,
.button-secondary:focus {
	color: #135e96;
	border-color: #135e96;
}

/* Notices */
.notice {
	margin: 15px 0;
	padding: 12px;
}

.notice-success {
	border-left-color: #46b450;
	background: #ecf7ed;
}

.notice-error {
	border-left-color: #dc3232;
	background: #f9e7e7;
}

.notice-warning {
	border-left-color: #ffb900;
	background: #fff8e5;
}

.notice-info {
	border-left-color: #00a0d2;
	background: #e5f5fa;
}

/* Loading Spinner */
.spinner {
	float: none;
	margin: 0 10px;
	display: inline-block;
	visibility: hidden;
}

.spinner.is-active {
	visibility: visible;
}

/* Cards */
.card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.card h2, .card h3 {
	margin-top: 0;
}

/* Stats Grid */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.stat-box {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 20px;
	text-align: center;
}

.stat-box .stat-number {
	font-size: 36px;
	font-weight: bold;
	color: #2271b1;
	display: block;
	margin-bottom: 5px;
}

.stat-box .stat-label {
	font-size: 14px;
	color: #666;
}

/* Toggle Switch */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
	vertical-align: middle;
}

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

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 24px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}

input:checked + .toggle-slider {
	background-color: #2271b1;
}

input:checked + .toggle-slider:before {
	transform: translateX(26px);
}

/* Responsive */
@media screen and (max-width: 782px) {
	.form-table th,
	.form-table td {
		display: block;
		width: 100%;
		padding: 10px 0;
	}
	
	.stats-grid {
		grid-template-columns: 1fr;
	}
}


/* Redirect Tables */
.mpseo-redirects .wp-list-table,
.mpseo-404-monitor .wp-list-table {
    margin-top: 20px;
}

.redirect-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.redirect-type-301 {
    background: #d7f2d8;
    color: #1e4620;
}

.redirect-type-302,
.redirect-type-307 {
    background: #fff4e5;
    color: #8a6d3b;
}

.redirect-type-410,
.redirect-type-451 {
    background: #ffe5e5;
    color: #a94442;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Offer Catalog Repeater Styles */
.offer-catalog-repeater {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.catalog-name-field {
    margin-bottom: 20px;
}

.catalog-name-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.catalog-categories h4 {
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.category-item {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.category-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.category-header .category-name {
    flex: 1;
}

.category-services {
    padding-left: 20px;
    border-left: 3px solid #2271b1;
}

.service-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 10px;
    background: #f6f7f7;
    border-radius: 4px;
}

.service-item .service-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-price-row {
    display: flex;
    gap: 8px;
}

.service-price-row .service-price {
    width: 100px;
}

.service-price-row .service-currency {
    width: 60px;
}

.service-price-row .service-url {
    flex: 1;
}

.add-category-btn,
.add-service-btn {
    margin-top: 10px;
}

.add-category-btn .dashicons,
.add-service-btn .dashicons {
    vertical-align: middle;
    margin-right: 3px;
}

.remove-category-btn .dashicons,
.remove-service-btn .dashicons {
    vertical-align: middle;
}

/* ===== Dashboard SEO Modules ===== */
.mpseo-modules-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 24px;
    margin: 20px 0;
}

.mpseo-modules-section > h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1d2327;
}

.mpseo-modules-section .mpseo-modules-desc {
    color: #646970;
    font-size: 13px;
    margin: 0 0 24px 0;
}

.mpseo-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mpseo-module-card {
    border: 1px solid #ddd;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.mpseo-module-card.module-inactive {
    border-left-color: #c3c4c7;
}

.mpseo-module-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.mpseo-module-icon {
    width: 44px;
    height: 44px;
    background: #e05a1e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpseo-module-icon .dashicons {
    color: #fff;
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 1;
}

/* Green toggle for module cards */
.mpseo-module-card .toggle-switch input:checked + .toggle-slider {
    background-color: #4caf50;
}

.mpseo-module-active-icon {
    width: 26px;
    height: 26px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.mpseo-module-active-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    color: #fff;
}

.mpseo-module-inactive-icon {
    width: 26px;
    height: 26px;
    background: #c3c4c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.mpseo-module-inactive-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    color: #fff;
}

.mpseo-module-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #1d2327;
}

.mpseo-module-desc {
    font-size: 13px;
    color: #646970;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.mpseo-module-status {
    background: #f7f7f7;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 7px 12px;
    font-size: 13px;
    color: #1d2327;
    margin-bottom: 14px;
}

.mpseo-module-status strong {
    font-weight: 600;
}

.mpseo-module-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-top: auto;
}

.mpseo-module-link:hover {
    color: #135e96;
    text-decoration: underline;
}

@media screen and (max-width: 1200px) {
    .mpseo-modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .mpseo-modules-grid {
        grid-template-columns: 1fr;
    }
}