/**
 * Producer Theme - Consistent styling for all producer pages
 * Orange/white theme with modern card layouts
 */

/* Base styling */
body { 
  background: #f8f9fa; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

main {
  max-width: 1220px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Bronco Display Font */
.bronco-display {
  font-family: 'Bronco', 'Georgia', serif;
  font-weight: 700;
}

/* Typography */
.h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
}

.small {
  font-size: 13px;
}

/* Tabs - Inside cards with orange underline */
.em-tabs { 
  display: flex; 
  gap: 0; 
  margin: -24px -24px 20px -24px;
  padding: 0 24px;
  border-bottom: 2px solid #e5e7eb;
  background: #fff;
}

.em-tab-btn { 
  padding: 14px 20px; 
  font-size: 14px; 
  font-weight: 500;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; 
  color: #64748b;
  transition: all 0.2s;
}

.em-tab-btn:hover {
  color: #ff6a1c;
  background: #fff5f0;
}

.em-tab-btn.active { 
  background: transparent;
  color: #ff6a1c;
  border-bottom-color: #ff6a1c;
  font-weight: 600;
}

.em-panel { 
  display: none; 
}

.em-panel.active { 
  display: block; 
}

/* Cards - Orange border theme */
.card,
.em-outline {
  background: #fff !important;
  border: 2px solid #ff6a1c !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
  margin-bottom: 20px;
  overflow: hidden !important;
  padding: 0 !important;
  /* Override any parchment background from global.css */
  background-image: none !important;
}

/* Card headers - Orange background */
.card-header {
  background: #ff6a1c !important;
  color: #fff !important;
  padding: 20px 24px !important;
  margin: 0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none !important;
}

.card-header h2,
.card-header h3,
.card-header .h2 {
  color: #fff !important;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.card-header .small {
  color: rgba(255, 255, 255, 0.9);
}

.card-header .btn {
  background: #fff;
  color: #ff6a1c;
  border: 1px solid #fff;
  font-weight: 600;
}

.card-header .btn:hover {
  background: #fff7ed;
  color: #e55a0c;
  border-color: #fff7ed;
}

/* Alternative: Orange gradient headers */
.em-outline > .flex:first-child,
.card > .flex:first-child {
  background: linear-gradient(135deg, #ff6a1c 0%, #ff8c3c 100%);
  color: #fff;
  padding: 20px;
  margin: 0;
}

.em-outline > .flex:first-child h2,
.card > .flex:first-child h2 {
  color: #fff !important;
  margin: 0;
}

.em-outline > .flex:first-child .small,
.card > .flex:first-child .small {
  color: rgba(255, 255, 255, 0.9);
}

.em-outline > .flex:first-child .btn,
.card > .flex:first-child .btn {
  background: #fff;
  color: #ff6a1c;
  border: 1px solid #fff;
  font-weight: 600;
}

.em-outline > .flex:first-child .btn:hover,
.card > .flex:first-child .btn:hover {
  background: #fff7ed;
  color: #e55a0c;
  border-color: #fff7ed;
}

/* Content area padding */
.em-outline > .em-tabs {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 16px;
}

.em-outline > .small {
  padding-left: 20px;
  padding-right: 20px;
  display: block;
}

/* Lists - edge-to-edge */
.em-outline > .shows-list,
.em-outline > .events-list {
  padding-left: 0;
  padding-right: 0;
}

/* Individual show/event items */
.em-show-item,
.em-event-item {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.em-show-item:first-child,
.em-event-item:first-child {
  border-top: none;
}

.card-body {
  padding: 24px;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-finalized { 
  background: #dcfce7; 
  color: #166534; 
  border: 1px solid #86efac;
}

.badge-not-finalized { 
  background: #fef3c7; 
  color: #92400e; 
  border: 1px solid #fde68a;
}

/* Scrollable areas */
.shows-scroll-fixed,
.em-scroll-area { 
  --em-scroll-max: 670px;
}

.shows-scroll-fixed.is-scroll,
.em-scroll-area.is-scroll {
  max-height: 670px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding-bottom: 20px;
}

.shows-scroll-fixed.is-scroll::-webkit-scrollbar,
.em-scroll-area.is-scroll::-webkit-scrollbar { 
  width: 8px; 
}

.shows-scroll-fixed.is-scroll::-webkit-scrollbar-track,
.em-scroll-area.is-scroll::-webkit-scrollbar-track { 
  background: #f1f5f9; 
  border-radius: 4px; 
}

.shows-scroll-fixed.is-scroll::-webkit-scrollbar-thumb,
.em-scroll-area.is-scroll::-webkit-scrollbar-thumb { 
  background: #cbd5e1; 
  border-radius: 4px; 
}

.shows-scroll-fixed.is-scroll::-webkit-scrollbar-thumb:hover,
.em-scroll-area.is-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Events/Shows list padding */
.events-list,
.shows-list {
  padding-bottom: 20px;
}

/* Show/Event item styling */
.em-show-item,
.em-event-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff7ed !important;
  padding: 20px;
  margin-top: 16px;
  transition: all 0.2s;
}

/* Force no parchment background */
body.no-parchment .em-show-item,
body.no-parchment .em-event-item,
body.no-parchment .card {
  background: #fff7ed !important;
  background-image: none !important;
}

.em-show-item:hover,
.em-event-item:hover {
  background: #ffedd5 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.em-show-item:first-child,
.em-event-item:first-child { 
  margin-top: 0; 
}

/* Buttons - Unified system */
.btn, 
.btn-soft,
.btn-uniform {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Primary Orange Button */
.btn {
  background: #ff6a1c;
  color: #fff;
  border-color: #ff6a1c;
}

.btn:hover {
  background: #e55a0c;
  border-color: #e55a0c;
}

/* Soft Gray Button */
.btn-soft {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.btn-soft:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Button color variants */
.btn-yellow {
  background: #fbbf24;
  color: #78350f;
  border-color: #fbbf24;
}

.btn-yellow:hover {
  background: #f59e0b;
  border-color: #f59e0b;
}

.btn-blue {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.btn-blue:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-green {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.btn-green:hover {
  background: #059669;
  border-color: #059669;
}

.btn-red {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-red:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Event/Show item layout */
.em-event-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 16px 20px;
}

.em-event-header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.em-event-main {
  flex: 1;
  min-width: 0;
}

.em-event-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.em-event-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.em-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.em-event-date {
  font-weight: 500;
  color: #374151;
}

.em-event-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.em-event-footer {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.em-event-flyer {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 140px;
  height: 100%;
  min-height: 180px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
}

.em-event-flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Uniform button sizing */
.btn-uniform {
  min-width: 90px;
  height: 34px;
  padding: 7px 12px;
  font-size: 13px;
  justify-content: center;
}

/* Utility classes */
.flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.m-0 {
  margin: 0;
}

.text-center {
  text-align: center;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
  background: #f9fafb;
}

/* Open link buttons */
.open-link-btn {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.15s;
}

.open-link-btn:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Forms */
.form-label {
  display: block;
  margin-bottom: 16px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #ff6a1c;
  box-shadow: 0 0 0 3px rgba(255, 106, 28, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .em-event-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  
  .em-event-flyer {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .em-event-footer {
    grid-row: 2;
  }
  
  .btn-uniform {
    min-width: auto;
    flex: 1;
  }
}

/* Print hiding */
@media print {
  .no-print {
    display: none !important;
  }
}
