/* ======================================================
   Global Styling
   ====================================================== */
body {
  font-family: Arial, sans-serif;
  background: #fff;
}

/* ======================================================
   Navbar Styling
   ====================================================== */
.navbar .nav-link {
  color: white;
  font-weight: 500;
  position: relative;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.navbar .nav-link:hover {
  color: #e0f3ff;
}
.navbar .nav-link.active {
  color: #fff;
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  -webkit-transition: width 0.3s ease;
  transition: width 0.3s ease;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
}
.navbar .nav-link i {
  -webkit-transition: color 0.3s ease, -webkit-transform 0.4s ease;
  transition: color 0.3s ease, -webkit-transform 0.4s ease;
  transition: color 0.3s ease, transform 0.4s ease;
  transition: color 0.3s ease, transform 0.4s ease, -webkit-transform 0.4s ease;
}
.navbar-brand img {
  max-height: 40px;
}
.navbar-nav.scrollable {
  overflow-x: auto;
  -ms-flex-wrap: nowrap;
      flex-wrap: nowrap;
  scrollbar-width: none;
}
.navbar-nav.scrollable::-webkit-scrollbar {
  display: none;
}
.topbar-shadow {
  background-color: #1a9ed9;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: white;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ======================================================
   Sidebar & Panels
   ====================================================== */
.left-panel {
  background: linear-gradient(135deg, #0a1f44, #003c74);
  color: #fff;
  text-align: center;
}
.left-panel ul {
  padding-left: 0;
}
.left-panel i {
  width: 24px;
  text-align: center;
}

/* ======================================================
   Form & Buttons
   ====================================================== */
.signup-form input[type="text"],
.signup-form input[type="email"],
.signup-form input[type="password"],
.signup-form input[type="number"],
.signup-form select {
  height: 48px;
  border-radius: 8px;
}
.btn-success {
  background-color: #18d26e;
  border: none;
  font-weight: 500;
}
.btn-success:hover {
  background-color: #13b95e;
}
.form-check-label {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ======================================================
   Social Icons
   ====================================================== */
.social-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f1f1f1;
  color: #333;
  text-align: center;
  line-height: 42px;
  font-size: 18px;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}
.social-icon:hover {
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
}

/* ======================================================
   Design Builder
   ====================================================== */
/* Container */
#db-design-builder {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Bar */
.db-top-bar {
  height: 50px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0 20px;
  z-index: 25;
}
.db-global-tools {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
}
.db-global-tools label {
  font-weight: 500;
  margin-bottom: 0;
}

/* Content Row */
.db-content-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  overflow: hidden;
  position: relative;
}

/* Toolbar */
.db-toolbar {
  width: 90px;
  background-color: #f1f1f1;
  border-right: 1px solid #ddd;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 10px 0;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
.db-toolbar-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin: 15px 0;
  cursor: pointer;
  text-align: center;
  color: #333;
}
.db-toolbar-item i {
  font-size: 20px;
  margin-bottom: 5px;
}
.db-toolbar-item span {
  font-size: 12px;
}

/* Slide Panel */
.db-slide-panel-wrapper {
  position: relative;
  width: 0;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  overflow: hidden;
  -webkit-transition: width 0.3s ease;
  transition: width 0.3s ease;
}
.db-slide-panel-wrapper.active {
  width: 320px; /* Adjust as needed, 300-350px works well */
}
.db-slide-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #f0f4f8;
  border-left: 1px solid #ddd;
  -webkit-box-shadow: 2px 0 5px rgba(0,0,0,0.1);
          box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  padding: 10px;
  overflow-x: hidden; /* prevent horizontal scroll bar */
  display: none;
  width:89%;
}
.db-slide-panel.active {
  display: block;
}
.db-slide-panel .db-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  float: right;
  margin-bottom: 10px;
}

/* Canvas */
.db-canvas-container {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  background: #fff;
  padding: 10px;
  overflow: auto;
  min-width: 0;
  position: relative;
}
#db-canvas {
  border: 1px solid #ccc;
  background: #fff;
}

/* Trash Icon */
#db-delete-icon {
  position: absolute;
  background: #ff4d4d;
  color: white;
  padding: 5px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 30;
  font-size: 16px;
  display: none;
}
#db-delete-icon:hover {
  background: #cc0000;
}

/* Shapes Panel */
.db-shape-icons {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 10px;
}
.db-shape-icon {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  cursor: pointer;
  width: 60px;
  text-align: center;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  -webkit-transition: background-color 0.2s;
  transition: background-color 0.2s;
}
.db-shape-icon:hover {
  background-color: #e6e6e6;
}
.db-shape-icon i {
  font-size: 24px;
  color: #555;
}
.db-shape-icon svg {
  width: 24px;
  height: 24px;
}

/* Background Panel */

#db-panel-background {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 10px;
}

#db-panel-background label {
  font-weight: 600;
  margin-bottom: 4px;
}

#db-panel-background input[type="color"],
#db-panel-background input[type="file"] {
  width: 100%;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#db-panel-background hr {
  margin: 10px 0;
  border-top: 1px solid #ccc;
}

#db-panel-background .gradient-section {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 8px;
}

#db-panel-background .gradient-inputs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
}

#db-panel-background .gradient-inputs input[type="color"] {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

#db-panel-background button {
  -ms-flex-item-align: start;
      align-self: flex-start;
}

/* ======================================================
   Optional Future Features
   ====================================================== */
.canvas-toolbar {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 0.5rem;
  margin-top: 1rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}
.canvas-toolbar button,
.canvas-toolbar select,
.canvas-toolbar input[type="color"] {
  margin-right: 0.5rem;
}
.canvas-toolbar button:hover {
  opacity: 0.9;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

/* Layers Panel (Optional) */
#layers-panel {
  margin-top: 1rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 10px;
}
#layers-panel h5 {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
#layers-list div {
  background: #fff;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  margin-bottom: 5px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
#layers-list div span {
  font-size: 0.9rem;
}
#layers-list button {
  margin-left: 3px;
}

#layers-list {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 10px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center; /* centers the items horizontally */
  padding: 5px;
}


.layer-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column; /* stack name and buttons vertically */
  -webkit-box-align: stretch;
      -ms-flex-align: stretch;
          align-items: stretch;   /* buttons stretch full width */
  background: #fff;
  padding: 5px;
  margin-bottom: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  gap: 5px;
}

.layer-item:hover {
  -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.1);
          box-shadow: 0 0 5px rgba(0,0,0,0.1);
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}


/*#layers-list .layer-item span {
  -ms-flex-preferred-size: 100%;
      flex-basis: 100%;
  font-weight: 500;
  margin-bottom: 5px;
}*/
#layers-list .layer-item button {
  margin-left: 5px;
}

.layer-name i {
  margin-right: 6px;
  color: #555;
}
.layer-name {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  overflow: hidden; /* Ensures no wrap */
  white-space: nowrap; /* Keeps name on one line */
}


.layer-buttons {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  gap: 5px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap; /* optional for small screens */
}

.layer-buttons button {
  min-width: 28px;
  height: 28px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding: 0;
}
/* ======================================================
   Icon Animations
   ====================================================== */
.nav-dashboard:hover i {
  color: #ffe082;
  -webkit-transform: rotate(-10deg) scale(1.1);
          transform: rotate(-10deg) scale(1.1);
}
.nav-crm:hover i {
  color: #81d4fa;
  -webkit-animation: bounce 0.6s ease;
          animation: bounce 0.6s ease;
}
.nav-projects:hover i {
  color: #b39ddb;
  -webkit-animation: swing 0.6s ease;
          animation: swing 0.6s ease;
}
.nav-design:hover i {
  color: #ffab91;
  -webkit-animation: pulse 0.5s ease;
          animation: pulse 0.5s ease;
}
.nav-video:hover i {
  color: #80cbc4;
  -webkit-animation: wobble 0.5s ease;
          animation: wobble 0.5s ease;
}
.nav-docs:hover i {
  color: #aed581;
  -webkit-transform: rotate(12deg);
          transform: rotate(12deg);
}
.nav-portals:hover i {
  color: #f48fb1;
  -webkit-transform: scale(1.2);
          transform: scale(1.2);
}
.nav-settings:hover i {
  color: #90caf9;
  -webkit-transform: rotate(6deg);
          transform: rotate(6deg);
}

/* ======================================================
   Keyframes Animations
   ====================================================== */
@-webkit-keyframes bounce {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  30% { -webkit-transform: translateY(-6px); transform: translateY(-6px); }
  60% { -webkit-transform: translateY(4px); transform: translateY(4px); }
}
@keyframes bounce {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  30% { -webkit-transform: translateY(-6px); transform: translateY(-6px); }
  60% { -webkit-transform: translateY(4px); transform: translateY(4px); }
}
@-webkit-keyframes swing {
  0%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  30% { -webkit-transform: rotate(15deg); transform: rotate(15deg); }
  60% { -webkit-transform: rotate(-10deg); transform: rotate(-10deg); }
}
@keyframes swing {
  0%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  30% { -webkit-transform: rotate(15deg); transform: rotate(15deg); }
  60% { -webkit-transform: rotate(-10deg); transform: rotate(-10deg); }
}
@-webkit-keyframes pulse {
  0%, 100% { -webkit-transform: scale(1); transform: scale(1); }
  50% { -webkit-transform: scale(1.15); transform: scale(1.15); }
}
@keyframes pulse {
  0%, 100% { -webkit-transform: scale(1); transform: scale(1); }
  50% { -webkit-transform: scale(1.15); transform: scale(1.15); }
}
@-webkit-keyframes wobble {
  0%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  25% { -webkit-transform: rotate(8deg); transform: rotate(8deg); }
  50% { -webkit-transform: rotate(-8deg); transform: rotate(-8deg); }
  75% { -webkit-transform: rotate(5deg); transform: rotate(5deg); }
}
@keyframes wobble {
  0%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  25% { -webkit-transform: rotate(8deg); transform: rotate(8deg); }
  50% { -webkit-transform: rotate(-8deg); transform: rotate(-8deg); }
  75% { -webkit-transform: rotate(5deg); transform: rotate(5deg); }
}
/* Properties Panel */

#db-panel-properties label {
  display: block;
  margin-top: 8px;
  font-weight: 600;
}
#db-panel-properties input[type="number"],
#db-panel-properties input[type="color"],
#db-panel-properties input[type="range"] {
  width: 100%;
  margin-bottom: 8px;
  padding: 4px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

/* Vectors Panel */
.vector-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 12px;
  padding: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.vector-thumb {
  width: 64px;
  height: 64px;
  padding: 6px;
  background: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  -webkit-transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
  transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
  transition: transform 0.2s, box-shadow 0.2s;
  transition: transform 0.2s, box-shadow 0.2s, -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.vector-thumb:hover {
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.vector-thumb img {
  max-width: 90%;
  max-height: 90%;
}
