/* Dashboard Styles - Modern Card-Based Layout */

:root {
  /* Custom Color Palette for dayframe.io */
  --columbia-blue: #C0D8E0;
  --orange-web: #FEA82E;
  --anti-flash-white: #F4F7F8;
  --silver: #B0B5B8;
  --prussian-blue: #1D364B;
  --rich-black: #04111C;
  --office-green: #008000;
  --fire-brick: #B22222;
  
  /* Override theme variables */
  --color-primary: var(--orange-web);
  --color-bg: var(--anti-flash-white);
  --color-text: var(--prussian-blue);
  
  /* Additional colors for dashboard */
  --color-bg-light: var(--anti-flash-white);
  --color-bg-card: #ffffff;
  --color-border: rgba(176, 181, 184, 0.2);
  --color-text-muted: #7a8085;
  --color-success: #28a745;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;
  
  /* Shadows */
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.08), 0 3px 5px rgba(0,0,0,0.06);
  --shadow-lg: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Base Styles */
body {
  background: linear-gradient(135deg, var(--anti-flash-white) 0%, #e4e8f0 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  font-size: var(--font-md);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(254, 168, 46, 0.3);
}

.btn-primary {
  background-color: var(--orange-web);
  color: white;
}

.btn-primary:hover {
  background-color: #e89620;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(254, 168, 46, 0.25);
}

.btn-secondary {
  background-color: #f0f0f0;
  color: var(--prussian-blue);
  border: 1px solid rgba(176, 181, 184, 0.3);
}

.btn-secondary:hover {
  background-color: #e8e8e8;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.btn-success {
  background-color: var(--color-success);
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-danger {
  background-color: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  background-color: #f0f0f0;
}

.btn-icon {
  padding: 8px;
  border-radius: 50%;
  background-color: transparent;
}

.btn-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.btn-lg {
  padding: 12px 24px;
  font-size: var(--font-lg);
}

.btn-upgrade {
  background-color: var(--color-success);
  color: white;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: bold;
  transition: all var(--transition-normal);
}

.btn-upgrade:hover {
  background-color: #219a3a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.25);
}

.icon {
  font-size: 18px;
}

/* Header Styles */
.dashboard-header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  padding: var(--space-md) 0;
  margin-bottom: var(--space-lg);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content h1 {
  margin: 0;
  font-size: 24px;
}

.header-actions {
  display: flex;
  gap: var(--space-md);
}

/* Widget Grid */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* Widget Card */
.widget-card {
  background-color: var(--color-bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid rgba(176, 181, 184, 0.1);
}

.widget-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.widget-preview {
  position: relative;
  height: 180px;
  background-color: #f5f5f5;
  overflow: hidden;
}

.preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
}

.status-badge.free {
  background-color: var(--color-info);
}
  
.status-badge.premium {
  background-color: var(--color-success);
}

/* New: "Upgraded" badge for subscription-derived premium calendars */
.status-badge.upgraded {
  /* Purple brand color */
  background-color: #6b21a8; /* deep purple */
  /* Slightly stronger visual treatment for upgraded */
  box-shadow: 0 4px 10px rgba(107, 33, 168, 0.18);
  font-weight: 600;
}

.shared-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
  background-color: #6366f1;
  font-weight: 500;
}

.widget-info {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg-card);
}

.widget-name {
  margin: 0 0 var(--space-xs) 0;
  font-size: 18px;
  font-weight: 600;
}

.widget-details {
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: left;
  line-height: 1.6;
}

.calendar-name, .theme-name {
  margin-bottom: 4px;
}

.widget-actions {
  display: flex;
  padding: var(--space-sm);
  justify-content: space-between;
  align-items: center;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-lg);
  background-color: var(--color-bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin: var(--space-lg) 0;
  border: 1px solid rgba(176, 181, 184, 0.1);
}

.empty-state-content {
  max-width: 500px;
  margin: 0 auto;
}

.empty-state h2 {
  margin-top: 0;
  color: var(--orange-web);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: var(--space-lg);
}

.spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--orange-web);
  animation: spin 1s ease-in-out infinite;
}

.spinner.small {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* Form Styles */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 16px;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--orange-web);
  box-shadow: 0 0 0 3px rgba(254, 168, 46, 0.1);
}

.help-text {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Step Content */
.step-content {
  min-height: 300px;
}

/* Calendar List */
.calendar-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
}

.calendar-item {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  cursor: pointer;
}

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

.calendar-item.selected {
  background-color: rgba(0, 122, 255, 0.1);
}

.calendar-item input[type="radio"] {
  margin-right: var(--space-sm);
}

/* Theme Grid */
.theme-grid {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.theme-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition-fast);
  height: 80px;
  aspect-ratio: 1/1;
}

.theme-item.selected {
  border-color: var(--color-primary);
}

.theme-preview-swatch {
  height: 80px;
  aspect-ratio: 1/1;
}

.theme-name {
  font-size: 12px;
  text-align: left;
  padding: 0px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Success Modal */
.success-content {
  text-align: center;
  padding: var(--space-md) 0;
}

.success-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}


  /* Logo Branding */
  .sidebar-logo {
    width: 90%;
    display: flex;
    margin: 20px 0px;
    align-items: center;
    justify-content: flex-start;
    background-color: white;
    padding: 12px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .sidebar-logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  }
  
  .sidebar-logo img {
    width: 45px;
    height: auto;
    margin-right: 10px;
  }
  
  .sidebar-logo p {
    font-family: 'Dongle', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--prussian-blue);
    margin: 0;
    padding: 0;
  }
  
  /* Enhanced Navigation Buttons */
  .nav-btn {
    background-color: white;
    border: 1px solid rgba(176, 181, 184, 0.3);
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--prussian-blue);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
  }
  
  .nav-btn:hover {
    background-color: var(--anti-flash-white);
    border-color: var(--orange-web);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }
  
  .nav-btn:hover::before {
    left: 100%;
  }
  
  .nav-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }


/* Embed Code */
.embed-code {
  background-color: #f5f5f5;
  padding: var(--space-md);
  border-radius: var(--border-radius);
  font-family: monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: var(--space-md) 0;
}

.copy-status {
  text-align: center;
  color: var(--color-success);
  font-weight: 500;
  height: 24px;
}

/* Plan Options */
.plan-options {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.plan {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  background-color: white;
}

.plan:hover {
  border-color: var(--orange-web);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.plan-header {
  margin-bottom: var(--space-md);
}

.plan h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.price {
  font-size: 28px;
  font-weight: bold;
  color: var(--orange-web);
  margin: 10px 0;
}

.price span {
  font-size: 14px;
  font-weight: normal;
}

.savings {
  display: inline-block;
  background-color: var(--color-success);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: var(--space-xs);
}



/* Tooltip */
.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .widget-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  /* Improved 80/20 Layout Styling */
  .the-100 {
    margin: 0;
    display: flex;
    min-height: 100vh;
  }
  
  .the-20 {
    top: 0;
    left: 0;
    margin: 0;
    position: sticky;
    width: 20%;
    height: 100vh;
    box-sizing: border-box;
    border-right: 1px solid rgba(176, 181, 184, 0.2);
    background: linear-gradient(180deg, var(--prussian-blue) 0%, #2a4a64 100%);
    display: flex;
    align-items: center;
    padding: 20px 15px;
    flex-direction: column;
    color: white;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .the-80 {
    width: 80%;
    padding: 25px;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--anti-flash-white) 0%, #e4e8f0 100%);
  }
  
  
  #create-widget-btn {
    width: 90%;
    margin-top: 20px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  #create-widget-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(254, 168, 46, 0.3);
  }
  
  .navbar-main {
    padding: 15px 0 25px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 10px;
  }
  
  .nav-btn {
    background-color: white;
    border: 1px solid rgba(176, 181, 184, 0.3);
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--prussian-blue);
    transition: all 0.3s ease;
  }
  
  .nav-btn:hover {
    background-color: var(--anti-flash-white);
    border-color: var(--orange-web);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  }
  
  h1 {
    color: var(--prussian-blue);
    font-size: 2rem;
    margin: 20px 0 30px;
    font-weight: 600;
  }
  
  
  /* Responsive adjustments for the 80/20 layout */
  @media (max-width: 992px) {
    .the-100 {
      flex-direction: column;
    }
    
    .the-20 {
      width: 100%;
      height: auto;
      position: relative;
      padding: 15px;
      flex-direction: row;
      justify-content: space-between;
    }
    
    .the-80 {
      width: 100%;
    }
    
    #create-widget-btn {
      width: auto;
      margin-top: 0;
    }
  }
  
  .plan-options {
    flex-direction: column;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  
  .header-content h1 {
    margin-bottom: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .widget-grid {
    grid-template-columns: 1fr;
  }
  
  
  .widget-actions {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }
  
  .btn-upgrade {
    width: 100%;
    margin-top: var(--space-xs);
    order: 1;
  }
}

.nav-btn.premium-active {
  background-color: #a777e3;
  color: white;
}

#stripe-button-container {
  margin: 20px auto;
  max-width: 300px;
}

/* ===== CALENDAR SHARING STYLES ===== */

/* Sharing status badge */
.status-badge.shared {
  background-color: #4CAF50;
  color: white;
}

/* Share UUID display */
.share-uuid-display {
  background-color: #f5f5f5;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  border: 1px solid #ddd;
  word-break: break-all;
  margin-right: 8px;
  flex: 1;
}

.uuid-display-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.share-uuid-container {
  margin: 16px 0;
}

.share-uuid-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

/* Share instructions styling */
.share-instructions {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.share-instructions h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #333;
}

.share-instructions ol {
  margin: 0;
  padding-left: 20px;
}

.share-instructions li {
  margin-bottom: 8px;
}

/* Share info styling */
.share-info {
  background-color: #e8f4fd;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.share-info h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #0066cc;
}

.share-info ul {
  margin: 0;
  padding-left: 20px;
}

.share-info li {
  margin-bottom: 8px;
}

/* Form controls */
.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 8px;
  display: block;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 4px;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Widget removal styling */
.widget-to-remove {
  background-color: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
  margin: 12px 0;
  font-weight: bold;
  text-align: center;
}

/* Shared widget indicators */
.widget-card[data-is-shared="true"] {
  border-left: 4px solid #4CAF50;
}

.widget-card[data-is-shared="true"] .widget-name::after {
  content: " (Shared)";
  font-size: 12px;
  color: #4CAF50;
  font-weight: normal;
}

/* Button enhancements */
.widget-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

/* Share button styling */
.share-widget {
  background-color: #17a2b8;
  color: white;
}

.share-widget:hover {
  background-color: #138496;
}

/* Remove shared widget button */
.remove-shared-widget {
  background-color: #dc3545;
  color: white;
}

.remove-shared-widget:hover {
  background-color: #c82333;
}
/* ===== MODAL VISIBILITY FIX ===== */
/* Fix modal z-index and visibility issues */
.modal {
  z-index: 10000 !important;
}

.modal[style*="display: flex"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure modal overlay covers everything */
.modal .modal-overlay {
  z-index: 10001 !important;
}

/* Ensure modal container is on top */
.modal .modal-container {
  z-index: 10002 !important;
}

/* ===== ADD CALENDAR CARD STYLES ===== */
/* Add Calendar Card Styles */
.add-calendar-card {
  background: rgba(29, 54, 75, 0.85);
  backdrop-filter: blur(10px);
  border: 2px dashed rgba(254, 168, 46, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-calendar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(254, 168, 46, 0.1), transparent);
  transition: left 0.5s ease;
}

.add-calendar-card:hover::before {
  left: 100%;
}

.add-calendar-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(29, 54, 75, 0.3);
  border-color: rgba(254, 168, 46, 0.6);
  background: rgba(29, 54, 75, 0.95);
}

.add-calendar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-lg);
  text-align: center;
  color: white;
  min-height: 280px;
}

.add-calendar-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.add-calendar-card:hover .add-calendar-icon {
  transform: scale(1.1);
  opacity: 1;
}

.add-calendar-text h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.add-calendar-text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== CREATION OPTIONS MODAL STYLES ===== */
.creation-options-container {
  max-width: 500px;
}

.creation-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.creation-option {
  display: flex;
  align-items: center;
  padding: var(--space-lg);
  background: white;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.creation-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(254, 168, 46, 0.05), transparent);
  transition: left 0.5s ease;
}

.creation-option:hover::before {
  left: 100%;
}

.creation-option:hover {
  border-color: var(--orange-web);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(254, 168, 46, 0.15);
}

.option-icon {
  font-size: 32px;
  margin-right: var(--space-md);
  color: var(--orange-web);
  min-width: 50px;
  text-align: center;
}

.option-content {
  flex: 1;
}

.option-content h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--prussian-blue);
}

.option-content p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.option-arrow {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-left: var(--space-md);
  transition: all 0.3s ease;
}

.creation-option:hover .option-arrow {
  color: var(--orange-web);
  transform: translateX(5px);
}

/* ===== ERROR MESSAGE STYLES ===== */
.error-message {
  color: var(--color-danger);
  font-size: 14px;
  margin-top: var(--space-xs);
  padding: var(--space-xs);
  background-color: rgba(220, 53, 69, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--color-danger);
}

/* ===== ENHANCED MODAL ANIMATIONS ===== */
.modal {
  animation: modalFadeIn 0.3s ease;
}

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

.modal-container {
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE DESIGN UPDATES ===== */
@media (max-width: 768px) {
  .creation-option {
    padding: var(--space-md);
  }

  .option-icon {
    font-size: 28px;
    margin-right: var(--space-sm);
    min-width: 40px;
  }

  .add-calendar-content {
    padding: var(--space-md);
    min-height: 240px;
  }

  .add-calendar-icon {
    font-size: 40px;
  }
}

/* ===== SHARED CALENDAR SECTION STYLES ===== */
.shared-calendar-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  position: relative;
}

.shared-calendar-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: var(--space-md);
}

.shared-calendar-divider::before,
.shared-calendar-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.shared-calendar-divider span {
  padding: 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  background: white;
}

#inline-Raoo8knOLxeneegVbQUi-div{
  align-self: stretch !important;
}

/* Payment Success/Error Messages */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.payment-success-message,
.payment-canceled-message,
.premium-activated-message {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.payment-success-message h3,
.payment-canceled-message h3,
.premium-activated-message h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.payment-success-message p,
.payment-canceled-message p,
.premium-activated-message p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}
/* Disabled widget preview styling for freemium restrictions */
.mini-calendar-preview.disabled-preview {
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
  filter: grayscale(40%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reason badge shown on disabled previews */
.disabled-reason-badge {
  display: inline-block;
  background: #6b7280;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

/* Make the widget card look visually disabled when preview is restricted */
.widget-card.widget-inactive {
  opacity: 0.6;
  filter: grayscale(30%);
  pointer-events: none; /* disable interactions on the whole card in the UI */
}

/* Keep action buttons visible but disabled-looking for clarity */
.widget-card.widget-inactive .widget-actions .btn {
  pointer-events: none;
  opacity: 0.5;
}

/* Upgrade CTA container */
#upgrade-modal .upgrade-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
  text-align: center;
}

/* Animated orange gradient pill button */
#upgrade-modal .upgrade-cta .btn {
  /* kill any global full-width button styles */
  width: auto !important;
  min-width: 220px;
  max-width: 340px;
  display: inline-flex;
  justify-content: center;
  align-items: center;

  padding: 12px 22px;
  border-radius: 9999px;
  border: none;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;

  background: linear-gradient(
    110deg,
    #ff9900 0%,
    #ffb300 25%,
    #ff7a00 50%,
    #ff9900 75%,
    #ffb300 100%
  );
  background-size: 200% 200%;
  box-shadow: 0 6px 18px rgba(255, 153, 0, 0.35);

  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  animation: upgradeGradientShift 6s ease infinite;
}

/* Hover / active / focus states */
#upgrade-modal .upgrade-cta .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 153, 0, 0.45);
  filter: brightness(1.02);
}
#upgrade-modal .upgrade-cta .btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(255, 153, 0, 0.35);
}
#upgrade-modal .upgrade-cta .btn:focus-visible {
  outline: 3px solid rgba(255, 179, 0, 0.65);
  outline-offset: 3px;
  border-radius: 9999px;
}

/* Small helper text under button */
#upgrade-modal .upgrade-cta .cta-hint {
  font-size: 12px;
  opacity: 0.9;
  color: #e9eefc; /* adjust if needed for your banner bg */
}

/* Keyframes for the gradient */
@keyframes upgradeGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  #upgrade-modal .upgrade-cta .btn {
    animation: none;
  }
}
