/* ===== RESET AND BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: hidden;
  background: var(--bg-neutral);
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  margin-left: 0;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}

/* ===== CONTENT AREA ===== */
.content-wrapper {
  padding: 25px;
}

/* ===== LOGO MANAGEMENT PAGE STYLES ===== */
.logo-management-container {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-neutral);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Preview Section */
.preview-section {
  display: flex;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  gap: 20px;
}

.preview-image-container {
  flex: 0 0 200px;
  height: 200px;
  background: var(--bg-white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  color: var(--text-muted);
  font-size: 3rem;
  text-align: center;
}

.preview-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-item {
  display: flex;
  margin-bottom: 15px;
}

.preview-label {
  font-weight: 600;
  color: var(--text-primary);
  width: 120px;
  flex-shrink: 0;
}

.preview-value {
  color: var(--text-secondary);
}

/* Form Section */
.logo-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  flex: 1;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--bg-neutral);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--bg-primary);
  box-shadow: 0 0 0 2px var(--bg-primary-light);
}

.file-upload-container {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  background: var(--bg-neutral);
  border: 1px dashed var(--bg-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 120px;
}

.file-upload-label:hover {
  background: var(--bg-primary-light);
}

.file-upload-label.has-image {
  padding: 0;
  background: var(--bg-white);
  border: 1px solid var(--bg-neutral);
}

.file-upload-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.file-upload-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: none;
  border-radius: 4px;
}

.file-upload-preview.show {
  display: block;
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.file-upload-content.hidden {
  display: none;
}

.file-upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.file-upload-text {
  color: var(--text-primary);
  font-weight: 500;
}

.file-name {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--bg-primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--bg-darker);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-neutral);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-light);
  color: var(--text-black);
  transform: translateY(-2px);
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .preview-section {
    flex-direction: column;
  }

  .preview-image-container {
    flex: 0 0 auto;
    width: 100%;
    height: 150px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .content-wrapper {
    padding: 20px 15px;
  }

  .logo-management-container {
    padding: 20px 15px;
  }

  .section-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .file-upload-label {
    min-height: 100px;
  }

  .file-upload-preview {
    height: 100px;
  }
}

@media (max-width: 576px) {
  .content-wrapper {
    padding: 15px 10px;
  }

  .btn {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .preview-image-container {
    height: 120px;
  }

  .file-upload-label {
    min-height: 80px;
  }

  .file-upload-preview {
    height: 80px;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* ===== LOGO PREVIEW STYLES ===== */
.preview-image-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #7d3a2e;
  background: linear-gradient(135deg, #f8e9e9, #f5f5f5);
  box-shadow: 0 8px 25px rgba(125, 58, 46, 0.2);
  position: relative;
  margin: 0 auto 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preview-image-container:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(125, 58, 46, 0.3);
  border-color: #9d4a3e;
}

.preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8e9e9, #e8d9d9);
  color: #7d3a2e;
  font-size: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.preview-placeholder i {
  margin-bottom: 10px;
  opacity: 0.7;
}

.preview-placeholder::after {
  content: "लोगो प्रिव्ह्यू";
  font-size: 0.9rem;
  font-weight: 600;
  color: #7d3a2e;
  margin-top: 10px;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-placeholder.has-image .preview-image {
  display: block;
}

.preview-placeholder.has-image::after {
  content: "लोगो";
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 15px;
  border-radius: 20px;
  bottom: 15px;
}

.preview-placeholder.has-image i {
  display: none;
}

/* ===== SIMPLE IMAGE MODAL STYLES ===== */
.image-modal-simple {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.image-modal-simple.show {
  display: flex;
}

.modal-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.close-modal-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .preview-image-container {
    width: 180px;
    height: 180px;
  }

  .modal-img {
    max-width: 95%;
    max-height: 95vh;
  }

  .close-modal-btn {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .preview-image-container {
    width: 150px;
    height: 150px;
  }

  .preview-placeholder {
    font-size: 2.5rem;
  }

  .modal-img {
    max-width: 100%;
    max-height: 100vh;
  }

  .close-modal-btn {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Additional preview section styles */
.preview-section {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  text-align: center;
}

.preview-details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px dashed #e9ecef;
}

.preview-item {
  background: #f8f9fa;
  padding: 12px 20px;
  border-radius: 10px;
  min-width: 150px;
  border-left: 4px solid #7d3a2e;
}

.preview-label {
  font-weight: 600;
  color: #7d3a2e;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.preview-value {
  font-size: 1rem;
  color: #495057;
  font-weight: 500;
}

/* Add CSS for remove button */
.remove-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  z-index: 10;
  transition: all 0.3s ease;
  display: none;
}

.remove-image-btn:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
}

/* Default icon */
.default-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

.default-icon i {
  font-size: 48px;
  margin-bottom: 10px;
  color: #adb5bd;
  transition: all 0.3s ease;
}

.default-icon:hover i {
  color: #6c757d;
  transform: scale(1.1);
}

.default-icon span {
  font-size: 14px;
  color: #6c757d;
}

.default-icon:hover span {
  color: #495057;
}

/* Enhanced border styles */
.file-upload-label {
  position: relative;
  border: 2px solid #2c3e50;
  border-radius: 12px;
  padding: 15px;
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.file-upload-label:hover {
  border-color: #1a252f;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.file-upload-label.hover-border {
  border-color: #3498db;
  border-style: dashed;
}

.file-upload-label.active-border {
  border: 3px solid #2ecc71;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.file-upload-label.default-image-border {
  border: 3px solid #f39c12;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-upload-label.has-image {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.file-upload-preview {
  cursor: pointer;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  display: none; /* Start hidden, shown by JavaScript */
}

.file-upload-content {
  text-align: center;
  padding: 20px;
  display: block; /* Start visible */
}

.file-upload-icon {
  font-size: 48px;
  color: #2c3e50;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.file-upload-label:hover .file-upload-icon {
  color: #3498db;
  transform: scale(1.1);
}

.file-upload-text {
  font-size: 16px;
  color: #2c3e50;
  font-weight: 600;
  display: block;
  margin-top: 10px;
}

.file-upload-label:hover .file-upload-text {
  color: #3498db;
}

/* File upload container */
.file-upload-container {
  margin-top: 10px;
}

.file-name {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  font-size: 14px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

/* Animation */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.file-upload-label.active-border {
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border-default {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(243, 156, 18, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
  }
}

.file-upload-label.default-image-border {
  animation: pulse-border-default 3s infinite;
}

/* Modal styles */
.image-modal-simple {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.image-modal-simple.show {
  display: flex;
}

.close-modal-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modal-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Make images clickable */
.preview-image-container {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.preview-image-container:hover {
  transform: scale(1.02);
}

.preview-image {
  cursor: pointer;
}
