@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Great+Vibes&display=swap');

:root {
  /* Color Palette */
  --primary-color: #4A0E4E;
  --primary-light: #6A1B70;
  --primary-dark: #2F0533;
  --primary-rgb: 74, 14, 78;
  
  --accent-color: #D80073;
  --accent-light: #FF1E9A;
  --accent-hover: #B0005C;
  --accent-rgb: 216, 0, 115;
  
  --bg-warm: #FAF6F0;
  --bg-white: #FFFFFF;
  --text-dark: #2C252D;
  --text-light: #6E6170;
  --text-white: #FFFFFF;
  
  --border-color: #EADEC9;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(74, 14, 78, 0.08), 0 4px 6px -2px rgba(74, 14, 78, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(74, 14, 78, 0.12), 0 10px 10px -5px rgba(74, 14, 78, 0.06);
  
  /* Typography */
  --font-main: 'Montserrat', sans-serif;
  --font-accent: 'Playfair Display', serif;
  --font-script: 'Great Vibes', cursive;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-warm);
  color: var(--text-dark);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-accent);
  color: var(--primary-color);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
  box-shadow: 0 4px 10px rgba(74, 14, 78, 0.15);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-white);
  box-shadow: 0 4px 10px rgba(216, 0, 115, 0.15);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-delete {
  background-color: transparent;
  color: #D80000;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-delete:hover {
  background-color: rgba(216, 0, 0, 0.08);
}

.btn-edit {
  background-color: transparent;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  margin-right: 8px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-edit:hover {
  background-color: rgba(74, 14, 78, 0.08);
}

/* Forms */
.contact-form-box {
  background-color: var(--bg-white);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

label.btn {
  color: var(--text-white) !important;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 14, 78, 0.1);
}

/* Admin Grid Layout */
.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.admin-table th, .admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* Quill Editor custom styling to match system */
#newsContentEditor {
  border-radius: 0 0 12px 12px;
  border-color: var(--border-color);
}

.ql-toolbar {
  border-radius: 12px 12px 0 0;
  border-color: var(--border-color) !important;
  background-color: var(--bg-warm);
}

/* Preset Badge Helpers */
.badge-helper {
  transition: var(--transition-fast);
}

.badge-helper:hover {
  background-color: rgba(74, 14, 78, 0.15) !important;
  transform: translateY(-1px);
}

/* Responsive Layout */
@media (max-width: 992px) {
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Modals for Preview */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(47, 5, 51, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-warm);
  width: 90%;
  max-width: 650px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transform: scale(0.9);
  transition: var(--transition-smooth);
}

.modal-backdrop.show .modal-content {
  transform: scale(1);
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  color: var(--text-white);
  font-size: 1.3rem;
  font-family: var(--font-accent);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.8;
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
}

/* Rich Text / HTML styling for CMS articles */
.news-content-body {
  word-wrap: break-word;
}

.news-content-body p {
  margin-bottom: 16px;
  color: var(--text-dark);
  line-height: 1.7;
}

.news-content-body ul, .news-content-body ol {
  margin-top: 8px;
  margin-bottom: 16px;
  padding-left: 24px;
}

.news-content-body ul {
  list-style-type: disc !important;
}

.news-content-body ol {
  list-style-type: decimal !important;
}

/* --- Visual CMS Designer Grid Styles --- */
.wysiwyg-grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}

.wysiwyg-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

@media (max-width: 768px) {
  .wysiwyg-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Visual Interactive Image Picker Box */
.visual-image-picker-box {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 8px;
  background-color: var(--bg-warm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
}

.visual-image-picker-box:hover {
  border-color: var(--accent-color);
  background-color: rgba(216, 0, 115, 0.02);
}

.visual-image-picker-box img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 12px;
  transition: var(--transition-smooth);
  display: block;
}

.visual-image-picker-box:hover img {
  filter: brightness(0.7);
}

.visual-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(74, 14, 78, 0.5);
  color: var(--text-white);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.visual-image-picker-box:hover .visual-image-overlay {
  opacity: 1;
}

.visual-image-overlay i {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.visual-image-overlay span {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Visual Card Editor styling */
.visual-card-editor {
  background: rgba(74, 14, 78, 0.01);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
}

.visual-card-editor:hover {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-color: rgba(74, 14, 78, 0.15);
}

.visual-card-editor-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(234, 222, 201, 0.5);
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Media List Builder */
.media-list-builder {
  background-color: var(--bg-warm);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

.media-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.media-list-item-card {
  position: relative;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.media-list-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.media-list-item-thumb {
  width: 100%;
  height: 80px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  background-color: #1a081c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  position: relative;
}

.media-list-item-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(216, 0, 115, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: var(--transition-fast);
  z-index: 10;
}

.media-list-item-delete-btn:hover {
  background: #b0005c;
  transform: scale(1.1);
}

.media-list-item-name {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 6px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Document Manager styling */
.btn-doc-edit {
  flex: 1;
  font-size: 0.7rem;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-doc-edit:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

.btn-doc-delete {
  flex: 1;
  font-size: 0.7rem;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #D80000;
  background: transparent;
  color: #D80000;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-doc-delete:hover {
  background: #D80000;
  color: var(--text-white);
}
