/* ==========================================================================
   PROJECT DETAILS MODAL & MEDIA UPLOADER STYLES
   Barış Koç - Detaylı Bilgi Modalı ve Fotoğraf Galerisi
   ========================================================================== */

.project-modal-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal-container.active {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: #0a0f1a;
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--neon-cyan-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal-container.active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: rgba(14, 22, 36, 0.9);
  border-bottom: 1px solid var(--border-dim);
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-badge-tag {
  font-family: var(--font-hud);
  font-size: 11px;
  background: rgba(0, 255, 157, 0.15);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.close-modal-btn:hover {
  background: var(--neon-red);
  color: #ffffff;
  border-color: var(--neon-red);
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Modal Gallery Carousel */
.modal-gallery-wrap {
  position: relative;
  background: #05080f;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-stage {
  position: relative;
  width: 100%;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0e1726 0%, #05080f 100%);
}

.gallery-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(6, 12, 20, 0.75);
  border: 1px solid var(--border-bright);
  color: var(--neon-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all var(--trans-fast);
}

.gallery-nav-btn:hover {
  background: var(--neon-cyan);
  color: #030a14;
  box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.gallery-prev-btn { left: 16px; }
.gallery-next-btn { right: 16px; }

.gallery-caption-bar {
  padding: 10px 16px;
  background: rgba(8, 14, 24, 0.9);
  border-top: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Gallery Thumbnails */
.gallery-thumbs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #070b14;
  overflow-x: auto;
  border-top: 1px solid var(--border-dim);
}

.gallery-thumb {
  position: relative;
  width: 68px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--trans-fast);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
  transform: scale(1.05);
}

.delete-thumb-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--neon-red);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
}

.delete-thumb-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Modal Specs & Content Layout */
.modal-specs-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.modal-section-card {
  background: rgba(14, 22, 34, 0.6);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 22px;
}

.modal-section-title {
  font-size: 16px;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-desc-text {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.modal-role-box {
  background: rgba(0, 240, 255, 0.05);
  border-left: 3px solid var(--neon-cyan);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: #e2e8f0;
}

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

.spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.spec-bullet {
  color: var(--neon-green);
  font-size: 11px;
  line-height: 1.6;
  flex-shrink: 0;
}

/* Photo & Content Uploader Tool in Modal */
.modal-uploader-panel {
  background: rgba(12, 19, 31, 0.8);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-md);
  padding: 22px;
}

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

.uploader-title {
  font-size: 16px;
  color: var(--neon-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.uploader-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notes-editor-box {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-notes-textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(6, 10, 16, 0.8);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 12px;
  font-size: 14px;
  resize: vertical;
}

.custom-notes-textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.custom-notes-display-box {
  background: rgba(0, 255, 157, 0.05);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.custom-notes-title {
  font-family: var(--font-hud);
  font-size: 12px;
  color: var(--neon-green);
  margin-bottom: 6px;
}

.custom-notes-text {
  font-size: 14px;
  color: var(--text-main);
  white-space: pre-wrap;
}

.uploader-notice {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-specs-grid {
    grid-template-columns: 1fr;
  }

  .gallery-stage {
    height: 250px;
  }

  .modal-dialog {
    max-height: 95vh;
  }
}

/* ==========================================================================
   VISITOR MODE RESTRICTIONS
   ========================================================================== */
body.visitor-mode .admin-only {
  display: none !important;
}

/* ==========================================================================
   FLOATING ADMIN TOOLBAR
   ========================================================================== */
.admin-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-floating-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.admin-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(10, 16, 26, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px var(--neon-cyan-glow);
  border-radius: 40px;
}

.admin-bar-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 14px;
  border-right: 1px solid var(--border-dim);
}

.admin-mode-text {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  white-space: nowrap;
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cyber-btn-xs {
  padding: 6px 14px;
  font-size: 12px;
}

.cyber-btn-exit:hover {
  background: var(--neon-red) !important;
  border-color: var(--neon-red) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   ADD PROJECT CARD (ADMIN)
   ========================================================================== */
.add-project-card {
  border: 2px dashed var(--border-bright) !important;
  background: rgba(0, 240, 255, 0.03) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  min-height: 380px;
  transition: all var(--trans-smooth);
}

.add-project-card:hover {
  border-color: var(--neon-cyan) !important;
  background: rgba(0, 240, 255, 0.08) !important;
  box-shadow: 0 12px 35px var(--neon-cyan-glow) !important;
  transform: translateY(-4px);
}

.add-project-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 20px;
}

.add-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  transition: all var(--trans-fast);
}

.add-project-card:hover .add-icon-circle {
  background: var(--neon-cyan);
  color: #040810;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px var(--neon-cyan);
}

.add-project-title {
  font-family: var(--font-hud);
  font-size: 18px;
  color: var(--text-heading);
}

.add-project-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
}

/* ==========================================================================
   ADMIN MODALS & FORMS
   ========================================================================== */
.admin-modal-container {
  z-index: 1100;
}

.admin-dialog {
  max-width: 520px;
}

.admin-dialog-large {
  max-width: 820px;
}

.admin-modal-body {
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-scrollable-body {
  max-height: 72vh;
  overflow-y: auto;
}

.admin-modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

.admin-form-input,
.admin-form-textarea,
.admin-form-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all var(--trans-fast);
}

.admin-form-textarea {
  resize: vertical;
  line-height: 1.5;
}

.admin-form-input:focus,
.admin-form-textarea:focus,
.admin-form-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.admin-form-input.input-error {
  border-color: var(--neon-red) !important;
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.4) !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.admin-error-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-red);
  min-height: 16px;
}

.admin-help-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.admin-help-text strong {
  color: var(--neon-green);
}

.admin-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dim);
}

.admin-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.admin-photo-upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-photo-help {
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   LIGHT THEME ADAPTATIONS FOR MODALS & ADMIN
   ========================================================================== */
[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
}

[data-theme="light"] .modal-dialog {
  background: #ffffff;
  border-color: var(--neon-cyan);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .modal-header {
  background: #f8fafc;
  border-bottom-color: rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .modal-title {
  color: #0f172a;
}

[data-theme="light"] .close-modal-btn {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .modal-section-card {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .modal-desc-text {
  color: #334155;
}

[data-theme="light"] .modal-role-box {
  background: rgba(2, 132, 199, 0.08);
  color: #0f172a;
}

[data-theme="light"] .spec-list li {
  color: #334155;
}

[data-theme="light"] .gallery-stage {
  background: radial-gradient(circle at center, #f1f5f9 0%, #e2e8f0 100%);
}

[data-theme="light"] .gallery-caption-bar {
  background: #f8fafc;
  color: #475569;
  border-top-color: rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .gallery-thumbs-row {
  background: #f1f5f9;
  border-top-color: rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .gallery-nav-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .modal-uploader-panel {
  background: #f8fafc;
  border-color: rgba(5, 150, 105, 0.4);
}

[data-theme="light"] .custom-notes-textarea {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .custom-notes-display-box {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
}

[data-theme="light"] .custom-notes-text {
  color: #0f172a;
}

[data-theme="light"] .admin-floating-bar .admin-bar-content {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--neon-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 20px rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .admin-mode-text {
  color: #0284c7;
}

[data-theme="light"] .add-project-card {
  background: rgba(2, 132, 199, 0.03) !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
}

[data-theme="light"] .add-project-card:hover {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .admin-form-input,
[data-theme="light"] .admin-form-textarea,
[data-theme="light"] .admin-form-select {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .admin-form-label {
  color: #0284c7;
}

[data-theme="light"] .admin-dialog-actions {
  border-top-color: #e2e8f0;
}

@media (max-width: 768px) {
  .admin-grid-2col,
  .admin-grid-3col {
    grid-template-columns: 1fr;
  }
  .admin-floating-bar {
    width: 92%;
    bottom: 16px;
  }
  .admin-bar-content {
    flex-direction: column;
    gap: 8px;
    border-radius: var(--radius-md);
    padding: 12px;
  }
  .admin-bar-badge {
    border-right: none;
    border-bottom: 1px solid var(--border-dim);
    padding-right: 0;
    padding-bottom: 6px;
  }
}

