/**
 * Design Profile Styles
 * 
 * Styles for the Design Profile management page
 */

/* ========================================
   Animations
   ======================================== */

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

/* ========================================
   Layout
   ======================================== */

.dp-layout {
  display: flex;
  min-height: calc(100vh - 200px);
  background: #fff;
}
a:hover {
  text-decoration: none !important;
}
/* ========================================
   Sidebar
   ======================================== */

.dp-sidebar {
  width: 280px;
  min-width: 280px;
  background: #f5b800;
  padding: 40px 30px;
  color: #000;
}

.dp-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.dp-user-avatar {
  width: 32px;
  height: 32px;
  background: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5b800;
}

.dp-user-name {
  font-weight: 600;
  font-size: 16px;
}

.dp-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  margin: 25px 0;
}

.dp-sidebar-section {
  margin-bottom: 10px;
}

.dp-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.dp-sidebar-desc {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.dp-sidebar-link {
  display: block;
  color: #000;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  transition: opacity 0.2s;
}

.dp-sidebar-link:hover {
  color: #000;
  text-decoration: underline !important;
  opacity: 1;
}

/* ========================================
   Main Content
   ======================================== */

.dp-main {
  flex: 1;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
}

.dp-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
    gap: 20px;
    align-items: center;
}

a.quiz-btn {
  color: #000 !important;
}

.dp-create-btn,
.dp-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #f5b800;
  color: #f5b800 !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dp-create-btn:hover,
.dp-login-btn:hover {
  background: #f0f0f0;
  color: #f5b800 !important;
  border-color: #f5b800;
}

.dp-create-btn svg,
.dp-login-btn svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   Empty State
   ======================================== */

.dp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

.dp-empty-text {
  font-size: 15px;
  color: #666;
  line-height: 1.7;
  margin: 0 0 30px 0;
  max-width: 600px;
}

.dp-create-btn-primary {
  background: #f5b800;
  border-color: #f5b800;
  color: #000 !important;
}

.dp-create-btn-primary:hover {
  background: #e5ab00;
  border-color: #e5ab00;
  color: #000 !important;
}

/* ========================================
   Profile Cards
   ======================================== */

.dp-profile-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dp-profile-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px 30px;
  background: #fff;
  transition: box-shadow 0.2s;
}

.dp-profile-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dp-profile-active {
  border-color: #f5b800;
  box-shadow: 0 0 0 1px #f5b800;
}

.dp-profile-header {
  margin-bottom: 15px;
}

.dp-profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.dp-profile-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dp-edit-icon {
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.dp-edit-icon:hover {
  color: #f5b800;
}

.dp-profile-date {
  font-size: 13px;
  color: #888;
}

.dp-profile-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

button.dp-action-btn.dp-action-active,
button.dp-action-btn.dp-action-active:link,
button.dp-action-btn.dp-action-active:visited {
  color: #0071bc !important;
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
}

button.dp-action-btn.dp-action-active svg {
  color: #0071bc !important;
  fill: #0071bc !important;
}

button.dp-action-btn.dp-action-active:hover,
button.dp-action-btn.dp-action-active:active,
button.dp-action-btn.dp-action-active:focus,
button.dp-action-btn.dp-action-active:focus-visible {
  background: #f0f0f0 !important;
  background-color: #f0f0f0 !important;
  color: #0071bc !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

button.dp-action-btn.dp-action-active:hover svg,
button.dp-action-btn.dp-action-active:active svg,
button.dp-action-btn.dp-action-active:focus svg {
  color: #0071bc !important;
  fill: #0071bc !important;
}

.dp-action-deactivate {
  position: relative;
}

.dp-action-deactivate::after {
  content: "Click to deactivate";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.dp-action-deactivate::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #333;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.dp-action-deactivate:hover::after,
.dp-action-deactivate:hover::before {
  opacity: 1;
}

.dp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.dp-action-btn:hover {
  background: #f5f5f5 !important;
  color: #333;
}

.dp-action-delete:hover {
  color: #dc3545;
  background: #fff5f5;
}

.dp-profile-details {
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.dp-profile-details p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #555;
}

.dp-profile-details p:last-child {
  margin-bottom: 0;
}

.dp-profile-details strong {
  color: #333;
}

/* ========================================
   Pagination
   ======================================== */

.dp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.dp-pagination-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.dp-pagination-btn:hover:not(:disabled) {
  border-color: #f5b800;
  color: #fff;
}

.dp-pagination-btn.active {
  background: #f5b800;
  border-color: #f5b800;
  color: #000 !important;
  font-weight: 600;
}

.dp-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Font Awesome icon styling in pagination */
.dp-pagination-btn .fa {
  font-size: 12px;
}

/* ========================================
   Footer Actions
   ======================================== */

.dp-footer-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 40px;
}

.dp-footer-btn {
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dp-view-build-system {
  background: #f5b800;
  border: 2px solid #f5b800;
  color: #000;
}

.dp-view-build-system:hover {
  background: #e5ab00;
  border-color: #e5ab00;
  color: #000;
}

.dp-footer-btn-outline {
  background: #fff;
  border: 2px solid #333;
  color: #333;
}

.dp-footer-btn-outline:hover {
  background: #333;
  color: #fff;
}

/* Hide "View Products For This Profile" until build profile logic is improved post soft launch */
.dp-view-products {
  display: none;
}

/* ========================================
   Modal
   ======================================== */

.dp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.dp-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 30px 35px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dp-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.dp-modal-close:hover,
.dp-modal-close:focus,
.dp-modal-close:active {
  color: #000;
  background: none !important;
  background-color: transparent !important;
  outline: none;
  box-shadow: none;
}

.dp-modal-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 25px 0;
  color: #333;
}

body.dp-modal-open {
  overflow: hidden;
}

/* ========================================
   Form Elements
   ======================================== */

.dp-form-group {
  margin-bottom: 18px;
}

.dp-form-group input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  background: #fff;
}

.dp-form-group input[type="text"]:focus {
  outline: none;
  border-color: #f5b800;
}

.dp-form-group input[type="text"]::placeholder {
  color: #999;
}

.dp-form-row {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.dp-form-col {
  flex: 1;
}

.dp-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.dp-select-label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.dp-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dp-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.dp-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f5b800;
  cursor: pointer;
}

.dp-form-col select[multiple] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  min-height: 80px;
}

.dp-save-btn {
  width: 100%;
  padding: 14px;
  background: #f5b800;
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-save-btn svg {
  flex-shrink: 0;
}

.dp-save-btn:hover {
  background: #e5ab00;
  color: #000;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 992px) {
  .dp-layout {
    flex-direction: column;
  }

  .dp-sidebar {
    width: 100%;
    min-width: 100%;
    padding: 30px;
  }

  .dp-main {
    padding: 30px;
  }

  .dp-profile-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dp-profile-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .dp-sidebar {
    padding: 25px 20px;
  }

  .dp-main {
    padding: 20px;
  }

  .dp-form-row {
    flex-direction: column;
    gap: 20px;
  }

  .dp-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dp-footer-btn {
    text-align: center;
  }

  .dp-modal-content {
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .dp-profile-actions {
    gap: 8px;
  }

  .dp-action-btn {
    padding: 5px 8px;
    font-size: 12px;
  }

  .dp-action-btn svg {
    display: none;
  }
}

/* ========================================
   Additional Form Elements
   ======================================== */

.dp-filters-readonly {
  padding: 12px 15px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  word-break: break-word;
}

.dp-form-error {
  padding: 10px 15px;
  background: #fff5f5;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  color: #dc3545;
  font-size: 13px;
  margin-bottom: 15px;
}

.dp-footer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Filter Dropdowns
   ======================================== */

.dp-filter-dropdowns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.dp-filter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dp-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.dp-filter-select,
.dp-filter-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s;
}

.dp-filter-select:focus,
.dp-filter-input:focus {
  outline: none;
  border-color: #f5b800;
}

.dp-filter-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.dp-no-filters {
  font-size: 13px;
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  margin: 0;
}

@media (max-width: 480px) {
  .dp-filter-dropdowns {
    max-height: 200px;
  }
}

/* ========================================
   Enhanced Modal - Edit Profile
   ======================================== */

.dp-modal-large {
  max-width: 520px;
}

.dp-modal-large .dp-modal-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 30px;
}

/* Form Row - Side by Side Layout */
.dp-form-row {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.dp-form-group-half {
  flex: 1;
  min-width: 0;
}

/* Checkbox Group Styling */
.dp-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-checkbox-group.dp-checkbox-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px 20px;
}

.dp-checkbox-group.dp-checkbox-scrollable {
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
}

.dp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  padding: 4px 0;
}

.dp-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f5b800;
  cursor: pointer;
  margin: 0;
}

.dp-checkbox-text {
  user-select: none;
}

/* Interface Dropdowns */
.dp-interface-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.dp-interface-row:last-child {
  margin-bottom: 0;
}

.dp-interface-label {
  min-width: 100px;
  font-size: 13px;
  color: #666;
}

.dp-interface-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color 0.2s;
}

.dp-interface-select:focus {
  outline: none;
  border-color: #f5b800;
}

/* Software checkbox with yellow background when checked */
.dp-checkbox-label input[type="checkbox"]:checked + .dp-checkbox-text {
  font-weight: 500;
}

/* Responsive for new modal elements */
@media (max-width: 600px) {
  .dp-form-row {
    flex-direction: column;
    gap: 20px;
  }

  .dp-form-group-half {
    width: 100%;
  }

  .dp-interface-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dp-interface-label {
    min-width: auto;
  }

  .dp-interface-select {
    width: 100%;
  }
}

/* ========================================
   Dropdown Checkbox Selector
   ======================================== */

.dp-dropdown-select {
  position: relative;
  width: 100%;
}

.dp-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s;
}

.dp-dropdown-toggle:hover {
  border-color: #f5b800;
}

.dp-dropdown-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.2s;
}

.dp-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 2px solid #f5b800;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
}

.dp-dropdown-search {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.dp-dropdown-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #f5b800;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.dp-dropdown-search-input:focus {
  border-color: #e5ab00;
}

.dp-dropdown-search-input::placeholder {
  color: #999;
}

.dp-dropdown-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 5px 0;
}

.dp-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.15s;
}

.dp-dropdown-option:hover {
  background-color: #f5f5f5;
}

.dp-dropdown-option.dp-select-all {
  border-bottom: 1px solid #e0e0e0;
  font-weight: 500;
}

.dp-dropdown-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f5b800;
  cursor: pointer;
  margin: 0;
}

.dp-dropdown-option span {
  user-select: none;
}

/* Single-select dropdown (Journey Stage) */
.dp-single-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.15s;
}

.dp-single-option:hover {
  background-color: #f0f0f0;
  color: #000;
}

.dp-single-option.dp-option-selected {
  background-color: #f0f0f0;
  font-weight: 500;
  color: #000;
}

.dp-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}

.dp-dropdown-cancel,
.dp-dropdown-ok {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #000;
}

.dp-dropdown-cancel {
  background: #fff;
  border: 1px solid #ddd;
}

.dp-dropdown-cancel:hover {
  background: #eee;
  color: #000;
  border-color: #999;
}

.dp-dropdown-ok {
  background: #f5b800;
  border: 1px solid #f5b800;
}

.dp-dropdown-ok:hover {
  background: #e5ab00;
  border-color: #e5ab00;
  color: #000;
}
