/* ==============================================
   Novo Edit - Shared Styles
   Modern, clean design with improved UX
   ============================================== */

/* CSS Variables for consistent theming */
:root {
  /* Primary Colors */
  --primary-color: #00adee;
  --primary-hover: #0095cc;
  --primary-dark: #007bb3;
  
  /* Accent Colors */
  --accent-success: #28a745;
  --accent-error: #dc3545;
  --accent-warning: #ffc107;
  --accent-info: #17a2b8;
  
  /* Neutral Colors */
  --bg-primary: #00adee;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --border-light: #e9ecef;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 50%;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Typography - Using modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container Styles */
.container {
  max-width: 800px;
  margin: 60px auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-md) 0;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 173, 238, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input[readonly] {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(0, 173, 238, 0.3);
}

button:hover:not(:disabled),
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 173, 238, 0.4);
}

button:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-color);
  box-shadow: none;
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--accent-error) 0%, #c82333 100%);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Small Button */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Tables */
.table-responsive {
  width: 100%;
  margin: var(--spacing-md) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  table-layout: fixed;
}

th, td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: visible;
}

/* Truncated address */
.truncated-address {
  cursor: default;
}

tr:hover {
  background: rgba(0, 173, 238, 0.03);
}

tr:last-child td {
  border-bottom: none;
}

/* Compact columns for specific content */
.col-date { width: 85px; }
.col-link { width: 45px; }
.col-status { width: 70px; }
.col-num { width: 50px; text-align: center; }
.col-actions { width: 100px; }

/* Clickable truncated text */
.truncated-text {
  cursor: pointer;
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-style: dotted;
}
.truncated-text:hover {
  color: var(--primary-hover);
}

/* Text popup modal */
.text-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.text-popup-overlay.active {
  display: flex;
}
.text-popup-box {
  background: #fff;
  padding: 20px 24px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.text-popup-box h4 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.text-popup-box p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: var(--text-primary);
}
.text-popup-box button {
  margin-top: 16px;
  width: 100%;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--border-light);
}

.tabs button {
  padding: 10px 18px;
  font-size: 14px;
  background: linear-gradient(135deg, #e8f4fc 0%, #d0e8f7 100%);
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(0, 123, 179, 0.15);
  border: 1px solid rgba(0, 173, 238, 0.25);
}

.tabs button:hover {
  background: linear-gradient(135deg, #d0e8f7 0%, #b8ddf0 100%);
  color: var(--primary-dark);
  transform: none;
  box-shadow: 0 2px 5px rgba(0, 123, 179, 0.2);
}

.tabs button.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border-color: transparent;
}

/* Messages / Alerts */
.message,
#message,
#updateMessage {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  font-size: 14px;
  min-height: 20px;
}

.message.success,
#updateMessage.success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.message.error,
#updateMessage.error {
  background: rgba(220, 53, 69, 0.1);
  color: var(--accent-error);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Top Bar */
#topBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

#topBar h1 {
  margin: 0;
  font-size: 1.5rem;
}

#greeting {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.card-header {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}

/* Summary Card (Photographer Dashboard) */
.summary-card {
  background: linear-gradient(135deg, rgba(0, 173, 238, 0.08) 0%, rgba(0, 173, 238, 0.03) 100%);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  border: 2px solid rgba(0, 173, 238, 0.2);
}

.summary-card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn var(--transition-fast);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--transition-normal);
}

.modal-content h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.modal-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
  margin-top: var(--spacing-lg);
}

/* Progress Bar */
progress {
  width: 100%;
  height: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

progress::-webkit-progress-bar {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: var(--radius-md);
  transition: width var(--transition-normal);
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: var(--radius-md);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media screen and (max-width: 768px) {
  body {
    background: var(--primary-color);
  }
  
  .container {
    margin: 20px 10px;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
  }
  
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.25rem; }
  
  .tabs {
    flex-direction: column;
  }
  
  .tabs button {
    width: 100%;
  }
  
  th, td {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  button,
  .btn {
    width: 100%;
  }
  
  .modal-content {
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
  }
  
  .modal-buttons {
    flex-direction: column;
  }
  
  .modal-buttons button {
    width: 100%;
  }
  
  #topBar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  #topBar button {
    width: 100%;
  }
}

/* Table Scroll Container for Mobile */
.table-container {
  overflow-x: auto;
  margin: var(--spacing-md) 0;
  border-radius: var(--radius-md);
}

/* Search Container */
.search-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-input-wrapper::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 36px !important;
  margin: 0;
}

.search-btn {
  padding: 10px 16px;
  font-size: 14px;
  white-space: nowrap;
}

/* Results Info */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--spacing-sm);
}

.results-count {
  font-weight: 500;
}

/* Load More Button */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: var(--spacing-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  box-shadow: none;
  font-size: 14px;
}

.load-more-btn:hover:not(:disabled) {
  background: var(--border-light);
  color: var(--text-primary);
  border-color: var(--primary-color);
  transform: none;
  box-shadow: none;
}

/* Filter Container (legacy support) */
.filter-container {
  background: var(--bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.filter-container label {
  font-weight: 600;
  display: block;
  margin-bottom: var(--spacing-sm);
}

.filter-container input,
.filter-container select {
  margin-bottom: var(--spacing-sm);
}

/* Section Styles */
.section {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.section.active {
  display: block;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--accent-success); }
.text-error { color: var(--accent-error); }
.text-warning { color: var(--accent-warning); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.d-flex { display: flex; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

/* Profile Section Styling */
.profile-info {
  background: var(--bg-secondary);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.profile-info p {
  margin: var(--spacing-sm) 0;
}

.profile-info strong {
  color: var(--text-primary);
}

/* Divider */
.divider {
  border: none;
  height: 2px;
  background: var(--border-light);
  margin: var(--spacing-lg) 0;
}

