/* 此檔案用於承接原本散落在 templates 內的 <style> 與 style="..."，以符合 CSP（移除 style-src 'unsafe-inline'） */

/* ========== Utilities ========== */
.is-hidden { display: none !important; }
.is-inline { display: inline !important; }
.w-100 { width: 100% !important; }
.mt-1 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 30px !important; }
.text-muted { color: #666 !important; }
.text-muted-2 { color: #7f8c8d !important; }
.editor-box { height: 300px; }
.readonly-field {
  background-color: #f5f5f5;
  cursor: not-allowed;
}
.input-padding-8 { padding: 8px; }
.align-items-center { align-items: center; }
.flex-column-stretch { flex-direction: column; align-items: stretch; }
.resize-vertical { width: 100%; resize: vertical; }
.align-self-end { align-self: flex-end; }
.btn-block { width: 100% !important; }

/* 社群連結表單樣式 */
.social-link-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.social-link-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

/* author.html: plan card description clamp */
.plan-desc {
  margin-top: 0.65rem;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* ========== Migrated from templates: manage_plans.html ========== */
.manage-plans-container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.create-plan-form { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: #2c3e50; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }
.plans-list { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.plans-list h2 { margin-bottom: 1.5rem; }
.plan-item { padding: 1.5rem; border: 2px solid #e0e0e0; border-radius: 8px; margin-bottom: 1rem; transition: border-color 0.3s ease; }
.plan-item:hover { border-color: #3498db; }
.plan-item.inactive { opacity: 0.6; background-color: #f5f5f5; }
.plan-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 1rem; }
.plan-status { padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.875rem; font-weight: bold; }
.plan-status.active { background-color: #2ecc71; color: white; }
.plan-status.inactive { background-color: #95a5a6; color: white; }
.plan-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.plan-detail { display: flex; flex-direction: column; }
.plan-detail-label { font-size: 0.875rem; color: #7f8c8d; margin-bottom: 0.25rem; }
.plan-detail-value { font-size: 1rem; color: #2c3e50; font-weight: 500; }
.plan-price { font-size: 1.5rem; font-weight: bold; color: #3498db; }
.plan-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.plan-description { margin: 1rem 0; padding-top: 1rem; border-top: 1px solid #e0e0e0; }
.plan-description-text { color: #555; line-height: 1.6; text-align: left; white-space: pre-wrap; word-wrap: break-word; }
.toggle-form-btn { margin-bottom: 1rem; }
@media (max-width: 768px) {
  .manage-plans-container { padding: 0 0.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .plan-details { grid-template-columns: 1fr; }
  .plan-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .plan-actions { flex-direction: column; width: 100%; }
  .plan-actions .btn { width: 100%; }
  .create-plan-form { padding: 1.5rem; }
}
@media (max-width: 480px) {
  .manage-plans-container { padding: 0 0.5rem; }
  .page-header h1 { font-size: 1.5rem; }
  .plan-item { padding: 0.75rem; }
  .plan-name { font-size: 1.1rem; }
  .plan-price { font-size: 1.2rem; }
  .create-plan-form { padding: 1rem; }
}

/* ========== Migrated from templates: my_subscriptions.html ========== */
.subscriptions-container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.subscriptions-container .page-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid #e0e0e0; }
.subscriptions-container .page-header h1 { color: #2c3e50; margin-bottom: 0.5rem; }
.subscriptions-list { display: flex; flex-direction: column; gap: 1.5rem; }
.subscription-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid #3498db;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.subscription-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.subscription-card.cancelled { border-left-color: #95a5a6; opacity: 0.7; }
.subscription-card.expired { border-left-color: #e74c3c; }
.subscription-card.tobe-cancelled { border-left-color: #f39c12; }
.subscription-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem; }
.subscription-title { flex: 1; }
.subscription-title h3 { color: #2c3e50; margin-bottom: 0.25rem; font-size: 1.25rem; }
.subscription-author { color: #7f8c8d; font-size: 0.9rem; }
.subscription-status { display: flex; align-items: center; gap: 0.5rem; }
.status-badge { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }
.status-active { background: #d4edda; color: #155724; }
.status-tobe-cancelled { background: #fff3cd; color: #856404; }
.status-cancelled { background: #d1ecf1; color: #0c5460; }
.status-expired { background: #f8d7da; color: #721c24; }

/* my_subscriptions.html confirm dialogs (cancel/resume) */
.subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}
.detail-item { display: flex; flex-direction: column; gap: 0.25rem; }
.detail-label { font-size: 0.85rem; color: #7f8c8d; margin-bottom: 0.25rem; }
.detail-value { font-size: 1rem; color: #2c3e50; font-weight: 500; }
.subscription-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}
.cancel-confirm {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.cancel-confirm.show { display: flex; }
.confirm-dialog {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
}
.confirm-dialog h3 { margin-bottom: 1rem; color: #2c3e50; }
.confirm-dialog p { margin-bottom: 1.5rem; color: #555; }
.confirm-actions { display: flex; gap: 1rem; justify-content: flex-end; }
.btn.btn-success { background: #28a745; color: #fff; }
.btn.btn-success:hover { background: #218838; color: #fff; }
.btn.btn-danger { background: #dc3545; color: #fff; }
.btn.btn-danger:hover { background: #c82333; color: #fff; }
.btn.btn-secondary { background: #6c757d; color: #fff; }
.btn.btn-secondary:hover { background: #545b62; color: #fff; }
.alert { padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
@media (max-width: 768px) {
  .subscriptions-container { padding: 0 0.5rem; }
  .subscription-details { grid-template-columns: 1fr; }
  .subscription-header { flex-direction: column; align-items: flex-start; }
  .subscription-actions { flex-direction: column; width: 100%; }
  .subscription-actions .btn { width: 100%; }
  .confirm-dialog { max-width: 90%; padding: 1.5rem; }
}
@media (max-width: 480px) {
  .subscriptions-container { padding: 0 0.5rem; }
  .page-header h1 { font-size: 1.5rem; }
  .subscription-card { padding: 1rem; }
  .subscription-title h3 { font-size: 1.1rem; }
  .confirm-dialog { max-width: 95%; padding: 1rem; }
  .confirm-dialog h3 { font-size: 1.1rem; }
}

/* ========== Migrated from templates: profile.html ========== */
.profile-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.profile-header { text-align: center; margin-bottom: 40px; }
.profile-title { color: #333; margin-bottom: 20px; font-size: 28px; font-weight: 300; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 20px; display: block; object-fit: cover; }
.profile-info { background: #f8f9fa; padding: 30px; border-radius: 8px; margin-bottom: 30px; }
.info-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #e9ecef; }
.info-item:last-child { border-bottom: none; }
.info-label { font-weight: 500; color: #555; min-width: 100px; }
.info-value { color: #333; flex: 1; text-align: right; }
.info-item.nickname-item { padding: 20px 0; }
.info-item.nickname-item .info-value { text-align: right; display: flex; flex-direction: column; align-items: flex-end; width: 100%; }
/* bio item left align */
.info-item.bio-item .info-value { text-align: left; align-items: stretch; }
.info-item.bio-item .nickname-display { width: 100%; text-align: left; }
.info-item.bio-item .nickname-text { white-space: pre-wrap; text-align: left; }
.nickname-display { margin-bottom: 12px; }
.nickname-text { font-size: 1rem; color: #333; font-weight: 500; padding: 4px 0; }
.nickname-form { width: 100%; max-width: 400px; }
.nickname-input-group { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.nickname-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}
.nickname-input:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); background-color: #f8f9fa; }

/* profile.html: button + hint + focused styles (補回外移後缺漏，並限制在會員資料區塊) */
.profile-container .nickname-input:hover:not(:focus) { border-color: #bdc3c7; }
.profile-container .nickname-input::placeholder { color: #95a5a6; }
.profile-container .nickname-submit-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
  white-space: nowrap;
}
.profile-container .nickname-submit-btn:hover {
  background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
  transform: translateY(-1px);
}
.profile-container .nickname-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}
.profile-container .nickname-submit-btn:disabled,
.profile-container .nickname-submit-btn.is-disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
}
.profile-container .nickname-submit-btn .btn-icon { font-size: 0.95rem; font-weight: bold; }
.profile-container .nickname-submit-btn .btn-text { font-weight: 600; }
.profile-container .nickname-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f0f7ff;
  border-left: 3px solid #3498db;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #5a6c7d;
}
.profile-container .nickname-hint .hint-icon { font-size: 1rem; }
.profile-container .nickname-hint .hint-text { line-height: 1.4; }
.profile-container .focused .nickname-input { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); }

.profile-container .profile-actions { display: flex; gap: 15px; justify-content: center; }
.profile-container .profile-actions .btn { padding: 10px 20px; border-radius: 5px; font-weight: 500; border: none; cursor: pointer; }
.profile-container .profile-actions .btn-primary { background: #007bff; color: #fff; }
.profile-container .profile-actions .btn-primary:hover { background: #0056b3; color: #fff; text-decoration: none; }
.profile-container .profile-actions .btn-secondary { background: #6c757d; color: #fff; }
.profile-container .profile-actions .btn-secondary:hover { background: #545b62; color: #fff; text-decoration: none; }
.profile-container .profile-actions .btn-danger { background: #dc3545; color: #fff; }
.profile-container .profile-actions .btn-danger:hover { background: #c82333; color: #fff; text-decoration: none; }

/* profile bio textarea should be larger (override shared .nickname-input) */
.profile-container textarea#bio-input,
.profile-container textarea[name="bio"],
.profile-container .bio-item textarea.nickname-input {
  min-height: 160px !important;
  line-height: 1.5;
}

/* profile bio textarea width should align with nickname input */
.profile-container .bio-item .nickname-form {
  width: 100%;
  max-width: 400px; /* align with .nickname-form */
}
.profile-container .bio-item .nickname-input-group {
  width: 100%;
}
.profile-container .bio-item textarea#bio-input,
.profile-container .bio-item textarea[name="bio"] {
  width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .profile-container { margin: 1rem; padding: 30px 20px; }
  .profile-container .info-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .profile-container .info-value { width: 100%; text-align: left; }
  .profile-container .info-item.nickname-item .info-value { align-items: stretch; }
  .profile-container .profile-actions { flex-direction: column; gap: 10px; }
  .profile-container .profile-actions .btn { width: 100%; margin: 0; }
}
@media (max-width: 480px) {
  .profile-container { margin: 0.5rem; padding: 20px 15px; }
  .profile-title { font-size: 24px; }
  .profile-avatar { width: 96px; height: 96px; }
}

/* profile-nickname-form.js toggles */
.is-disabled { opacity: 0.7; cursor: not-allowed; }
.has-error { border-color: #e74c3c !important; }

/* ========== Migrated from templates: login.html / logout.html / payment_success.html / edit_plan.html ========== */
.login-container { max-width: 400px; margin: 100px auto; padding: 40px; background: #fff; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center; }
.login-title { color: #333; margin-bottom: 30px; font-size: 28px; font-weight: 300; }
.google-login-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 12px 24px; background: #4285f4; color: white; text-decoration: none; border-radius: 5px; font-size: 16px; font-weight: 500; transition: background-color 0.3s ease; border: none; cursor: pointer; }
.google-login-btn:hover { background: #3367d6; color: white; text-decoration: none; }
.google-icon { width: 20px; height: 20px; margin-right: 12px; background: white; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; color: #4285f4; }
.login-description { color: #666; margin-bottom: 30px; line-height: 1.5; }
.back-home { margin-top: 20px; }
.back-home a { color: #666; text-decoration: none; font-size: 14px; }
.back-home a:hover { color: #333; }

.logout-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 2rem; }
.logout-message { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 2rem; margin: 2rem 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.logout-icon { font-size: 3rem; color: #6c757d; margin-bottom: 1rem; }
.countdown { font-size: 1.2rem; color: #007bff; font-weight: bold; margin: 1rem 0; }
.btn-group { margin-top: 1rem; }
.btn-group a { margin: 0 0.5rem; }

.payment-success { max-width: 600px; margin: 40px auto; padding: 40px; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); text-align: center; }
.success-icon { width: 80px; height: 80px; margin: 0 auto 20px; background: #4CAF50; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 48px; }
.success-icon::before { content: "✓"; }
.payment-info { margin: 30px 0; padding: 20px; background: #f5f5f5; border-radius: 8px; text-align: left; }
.payment-info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e0e0e0; }
.payment-info-item:last-child { border-bottom: none; }
.payment-info-label { font-weight: bold; color: #666; }
.payment-info-value { color: #333; }
.subscription-info { margin: 20px 0; padding: 20px; background: #e8f5e9; border-radius: 8px; border-left: 4px solid #4CAF50; }
.subscription-info-title { margin-top: 0; color: #2e7d32; }
.subscription-info-text { margin-bottom: 0; color: #666; }
.action-buttons { margin-top: 30px; display: flex; gap: 15px; justify-content: center; }
@media (max-width: 768px) {
  .payment-success { margin: 20px auto; padding: 30px 20px; }
  .payment-info { padding: 15px; }
  .payment-info-item { flex-direction: column; gap: 0.5rem; }
}
@media (max-width: 480px) {
  .payment-success { margin: 10px; padding: 20px 15px; }
  .success-icon { width: 60px; height: 60px; font-size: 36px; }
  .payment-info { padding: 10px; }
}

/* edit_plan.html */
.edit-plan-container { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.edit-plan-form { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
@media (max-width: 768px) {
  .edit-plan-container { padding: 0 0.5rem; }
  .edit-plan-form { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}
@media (max-width: 480px) {
  .edit-plan-container { padding: 0 0.5rem; }
  .edit-plan-container h1 { font-size: 1.5rem; }
  .edit-plan-form { padding: 1rem; }
}

/* misc template inline style removals */
.article-hero-title { color: white; font-size: 2.5rem; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.no-subs-note { margin: 1rem 0; color: #666; }
.home-empty-note { color: #cfd8e3; }

/* test-session.html */
.test-session-wrap { padding: 2rem; text-align: center; }
.test-session-actions { margin: 2rem 0; }
.test-session-expiry-btn { padding: 0.5rem 1rem; background: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer; }
.test-session-cookie-info { background: #f8f9fa; padding: 1rem; border-radius: 4px; margin: 1rem 0; }

/* mobile-menu.js */
body.no-scroll { overflow: hidden; }
body.sidebar-open .author-selector,
body.sidebar-open .author-selector select { z-index: 1 !important; }

/* main.js toast (replaces inline <style> injection) */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 2rem;
  color: white;
  border-radius: 4px;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}
.toast-info { background: #3498db; }
.toast-success { background: #27ae60; }
.toast-error { background: #e74c3c; }
.toast-out { animation: slideOut 0.3s ease; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* rich-text-editor.js (Quill image menu / resize) */
.rte-image { display: inline-block; }
.image-context-menu {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 0.5rem 0;
  min-width: 150px;
}
.image-context-menu.pos-tl { top: 12px; left: 12px; }
.image-context-menu.pos-tr { top: 12px; right: 12px; }
.image-context-menu.pos-bl { bottom: 12px; left: 12px; }
.image-context-menu.pos-br { bottom: 12px; right: 12px; }
.image-context-menu-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.image-context-menu-item:hover { background: #f8f9fa; }


/* ========== Session expired modal (session-check.js) ========== */
#logoutAlertModal {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#logoutAlertModal .logout-modal-card {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
}
#logoutAlertModal .logout-modal-title {
  margin-bottom: 15px;
  color: #e74c3c;
}
#logoutAlertModal .logout-modal-text {
  margin-bottom: 20px;
  font-size: 1.1rem;
}
#logoutAlertModal .logout-modal-text-secondary {
  margin-bottom: 25px;
}
#logoutAlertModal #reloginButton {
  background-color: #3498db;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}
#logoutAlertModal #reloginButton:hover {
  background-color: #2d86c7;
}

/* ========== Migrated from templates: subscription_plans.html ========== */
.subscription-plans-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.author-selector {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
}
.sidebar-menu.active ~ * .author-selector,
body:has(.sidebar-menu.active) .author-selector { z-index: 1 !important; }
.sidebar-menu.active ~ * .author-selector select,
body:has(.sidebar-menu.active) .author-selector select { z-index: 1 !important; }
.author-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #2c3e50;
}
.author-selector select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
  position: relative;
  z-index: 10;
}
.author-selector select:hover { border-color: #3498db; }
.author-selector select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.author-selector select option {
  padding: 0.5rem;
  background-color: white;
  color: #2c3e50;
  display: block;
}
.author-selector select:focus { z-index: 10; }
@supports (-webkit-touch-callout: none) {
  .author-selector { z-index: 10 !important; }
  .author-selector select { -webkit-appearance: menulist !important; z-index: 10 !important; }
}
@media (max-width: 768px) {
  .author-selector { isolation: isolate; }
  body:has(.sidebar-menu.active) .author-selector { z-index: 1 !important; }
  body:has(.sidebar-menu.active) .author-selector select { z-index: 1 !important; }
}

/* remaining subscription_plans.html styles */
.plans-display { margin-top: 2rem; }
.plans-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #e0e0e0; }
.plans-header h2 { color: #2c3e50; margin-bottom: 0.5rem; }
.plans-header p { color: #7f8c8d; font-size: 0.95rem; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.plan-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-color: #3498db; }
.plan-name { font-size: 1.5rem; font-weight: bold; color: #2c3e50; margin-bottom: 0.5rem; }
.plan-price { font-size: 2rem; font-weight: bold; color: #3498db; margin: 1rem 0; }
.plan-price .currency { font-size: 1.2rem; margin-right: 0.25rem; }
.plan-billing-period { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 1rem; }
.plan-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
  min-height: 60px;
  white-space: pre-wrap;
  word-wrap: break-word;
  flex: 1;
}
.plan-actions { margin-top: auto; padding-top: 1rem; border-top: 1px solid #e0e0e0; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #7f8c8d; }
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { font-size: 1.1rem; }
@media (max-width: 768px) {
  .subscription-plans-container { padding: 0 0.5rem; }
  .plans-grid { grid-template-columns: 1fr; }
  .author-selector { padding: 1rem; position: relative; z-index: 10; }
  .author-selector select {
    font-size: 16px;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    position: relative;
    z-index: 10;
  }
  .plan-card { padding: 1.5rem; }
}
@media (max-width: 480px) {
  .subscription-plans-container { padding: 0 0.5rem; }
  .plans-header h2 { font-size: 1.3rem; }
  .author-selector { padding: 0.75rem; position: relative; z-index: 10; }
  .author-selector select {
    font-size: 16px;
    padding: 0.875rem;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    position: relative;
    z-index: 10;
  }
  body:has(.sidebar-menu.active) .author-selector { z-index: 1 !important; }
  body:has(.sidebar-menu.active) .author-selector select { z-index: 1 !important; }
  .plan-card { padding: 1rem; }
  .plan-card h3 { font-size: 1.2rem; }
  .plan-price { font-size: 1.5rem; }
  .plan-actions .btn { width: 100%; margin: 0.25rem 0; }
}


