/**
 * Settings Page Styles for 3D Scan & Show Plugin
 * 
 * Styles specific to the Settings page including:
 * - Authentication container and tabs
 * - Login/Register forms
 * - Logged-in state display
 * - User details grid
 * - Plan information
 * - Subscription status
 * - Quota display
 * - Quick links
 */

/* ==========================================================================
   AUTHENTICATION CONTAINER
   ========================================================================== */

.stw-auth-container {
	background: white;
	border: 1px solid var(--stw-border);
	border-radius: var(--stw-radius);
	padding: 0;
	max-width: 500px;
	margin: 20px auto;
	box-shadow: var(--stw-shadow);
}

.stw-auth-tabs {
	display: flex;
	border-bottom: 1px solid var(--stw-border);
	background: var(--stw-light-gray);
	border-radius: var(--stw-radius) var(--stw-radius) 0 0;
}

.stw-auth-tab {
	flex: 1;
	padding: 16px 20px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--stw-gray);
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.stw-auth-tab:hover {
	background: rgba(16, 185, 129, 0.05);
	color: var(--stw-primary);
}

.stw-auth-tab.active {
	background: white;
	color: var(--stw-primary);
	border-bottom-color: var(--stw-primary);
}

.stw-auth-tab .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.stw-auth-form {
	padding: 32px;
}

.stw-auth-form h2 {
	margin: 0 0 24px 0;
	font-size: 20px;
	color: var(--stw-dark);
	text-align: center;
	font-weight: 600;
}

.stw-auth-form .button {
	width: 100%;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 500;
}

/* ==========================================================================
   SETTINGS CARD
   ========================================================================== */

.stw-settings-card {
	padding: 24px;
	margin: 20px 0;
}

.stw-settings-card h2 {
	margin: 0 0 16px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--stw-dark);
}

/* ==========================================================================
   LOGGED-IN STATE
   ========================================================================== */

.stw-logged-in {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.stw-logged-in strong {
	display: block;
	margin-bottom: 5px;
}

#logged-in-email {
	font-size: 16px;
	margin-top: 6px;
	color: var(--stw-primary);
	font-weight: 500;
	animation: none !important;
}

/* ==========================================================================
   USER DETAILS GRID
   ========================================================================== */

.stw-user-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-top: 15px;
}

.stw-user-detail-item {
	padding: 16px;
	background: var(--stw-light-gray);
	border-radius: var(--stw-radius);
}

.stw-user-detail-item strong {
	display: block;
	margin-bottom: 6px;
	color: var(--stw-dark);
	font-weight: 600;
}

.stw-user-detail-item span {
	color: var(--stw-gray);
}

/* ==========================================================================
   PLAN INFORMATION
   ========================================================================== */

.stw-plan-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 15px;
}

.stw-plan-label {
	font-weight: 600;
	margin-bottom: 5px;
}

.stw-plan-details {
	margin-top: 8px;
	color: #666;
}

.stw-plan-details div {
	margin: 3px 0;
}

/* ==========================================================================
   SUBSCRIPTION STATUS
   ========================================================================== */

.stw-subscription-status {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px;
	background: rgba(16, 185, 129, 0.1);
	border-radius: var(--stw-radius);
	border: 1px solid rgba(16, 185, 129, 0.2);
}

.stw-subscription-status .dashicons {
	color: var(--stw-primary);
}

/* ==========================================================================
   QUOTA DISPLAY
   ========================================================================== */

.stw-quota-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	flex-wrap: wrap;
	gap: 10px;
}

.stw-quota-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stw-quota-row {
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

.stw-quota-row:last-child {
	border-bottom: none;
}

/* ==========================================================================
   QUICK LINKS
   ========================================================================== */

.stw-links-card {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.stw-quick-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.stw-quick-links .button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--stw-border);
	background: white;
	color: var(--stw-primary);
	text-decoration: none;
	border-radius: var(--stw-radius);
	transition: all 0.2s;
	cursor: pointer;
}

.stw-quick-links .button:hover {
	background: rgba(16, 185, 129, 0.05);
	border-color: var(--stw-primary);
	transform: translateY(-1px);
	box-shadow: var(--stw-shadow);
}

.stw-quick-links .button .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ==========================================================================
   SHOP CONFLICT MODAL
   ========================================================================== */

.stw-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.stw-modal-content {
	background: white;
	border-radius: var(--stw-radius);
	max-width: 500px;
	width: 90%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	animation: stw-modal-appear 0.2s ease-out;
}

@keyframes stw-modal-appear {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.stw-modal-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--stw-border);
}

.stw-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--stw-dark);
}

.stw-modal-body {
	padding: 24px;
}

.stw-modal-body p {
	margin: 0 0 16px 0;
	color: var(--stw-gray);
	line-height: 1.5;
}

.stw-existing-shop-info {
	background: var(--stw-light-gray);
	border-radius: var(--stw-radius);
	padding: 16px;
	margin-bottom: 16px;
}

.stw-existing-shop-info strong {
	display: block;
	margin-bottom: 8px;
	color: var(--stw-dark);
	font-size: 13px;
}

.stw-shop-details {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--stw-dark);
	font-weight: 500;
}

.stw-shop-details .dashicons {
	color: var(--stw-primary);
}

.stw-warning-text {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 12px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: var(--stw-radius);
	color: #856404;
	font-size: 13px;
	margin-bottom: 0 !important;
}

.stw-warning-text .dashicons {
	flex-shrink: 0;
	margin-top: 2px;
}

.stw-instruction-text {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	background: #e7f3ff;
	border: 1px solid #0073aa;
	border-radius: var(--stw-radius);
	color: #004085;
	font-size: 13px;
	margin-bottom: 0 !important;
}

.stw-instruction-text .dashicons {
	flex-shrink: 0;
	margin-top: 2px;
	color: #0073aa;
}

.stw-instruction-text ol {
	color: #004085;
	margin: 8px 0 0 16px;
	padding: 0;
}

.stw-instruction-text li {
	margin-bottom: 4px;
}

.stw-modal-header .dashicons-warning {
	color: #dc3232;
	font-size: 24px;
}

.stw-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 16px 24px;
	border-top: 1px solid var(--stw-border);
	background: var(--stw-light-gray);
	border-radius: 0 0 var(--stw-radius) var(--stw-radius);
}

.stw-danger-btn {
	background: #dc3232 !important;
	border-color: #dc3232 !important;
	color: white !important;
}

.stw-danger-btn:hover {
	background: #c92c2c !important;
	border-color: #c92c2c !important;
}

.stw-danger-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ==========================================================================
   SETTINGS RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 782px) {
	.stw-logged-in,
	.stw-plan-header,
	.stw-quota-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.stw-settings-card {
		padding: 15px;
	}

	.stw-modal-footer {
		flex-direction: column;
	}

	.stw-modal-footer .button {
		width: 100%;
	}
}
