/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  width: 34px;
  height: 24px;
}

.app-brand-logo.demo svg {
  width: 35px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks>* {
  display: block !important;
}

.demo-inline-spacing>* {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* Layout demo
******************************************************************************/


.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}

.layout-demo-placeholder img {
  width: 900px;
}

.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
}

.menu-link:hover {
  background-color: #f0f0f0;
}

.menu-link.active {
  background-color: #007bff !important;
  color: #fff !important;
}

.menu-link.active i,
.menu-link.active div {
  color: #fff !important;
}

.avatar {
  position: relative;
  width: 2.375rem;
  height: 2.375rem;
  cursor: pointer;
  background: linear-gradient(135deg, #0aef71 0%, #1f332e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;

}

.calculator-container {
  display: none;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

}

.calculator-container.show {
  display: block;
}


.calc-icon {
  cursor: pointer;
  font-size: 24px;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.calc-icon:hover {
  background-color: #555;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-title {
  font-size: 20px;
}

.calc-operators {
  display: flex;
  gap: 8px;
}

.operator-header-btn {
  padding: 1px 1px;
  font-size: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 35px;
}

.operator-header-btn:hover {
  background-color: #0056b3;
}

.operator-header-btn.active {
  background-color: #ffc107;
  color: #333;
}

.calc-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.calc-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  width: auto;
}

.calc-display {
  padding: 12px;
  font-size: 18px;
  background-color: #f8f9fa;
  border: 2px solid #007bff;
  border-radius: 5px;
  text-align: right;
  min-width: 120px;
  flex: 1;
  max-width: 150px;
  font-weight: bold;
  color: #333;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: #007bff #f8f9fa;
}

.calc-display::-webkit-scrollbar {
  height: 4px;
}

.calc-display::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.calc-display::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 2px;
}

.calc-input {
  padding: 6px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 5px;
  text-align: center;
  min-width: 70px;
  flex: 1;
  max-width: 150px;
}

.calc-input:focus {
  outline: none;
  border-color: #007bff;
}

.operator-btn {
  padding: 1px 1px;
  font-size: 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  min-width: 45px;
  transition: background-color 0.3s;
}

.operator-btn:hover {
  background-color: #0056b3;
}

.operator-btn.active {
  background-color: #ffc107;
  color: #333;
}


.percent-btn {
  padding: 12px 15px;
  font-size: 18px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  min-width: 45px;
  transition: background-color 0.3s;
}

.percent-btn:hover {
  background-color: #1e7e34;
}

.equals-btn {
  padding: 12px 20px;
  font-size: 18px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  min-width: 45px;
  transition: background-color 0.3s;
}

.equals-btn:hover {
  background-color: #c82333;
}

.clear-btn {
  padding: 12px 15px;
  font-size: 18px;
  background-color: #ffc107;
  color: #333;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  min-width: 45px;
  transition: background-color 0.3s;
  font-weight: bold;
}

.clear-btn:hover {
  background-color: #e0a800;
}

.result-display {
  padding: 12px;
  font-size: 18px;
  background-color: #f8f9fa;
  border: 2px solid #ddd;
  border-radius: 5px;
  text-align: right;
  min-width: 80px;
  flex: 1;
  max-width: 120px;
  font-weight: bold;
  color: #333;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: #28a745 #e8f5e8;
}

.result-display::-webkit-scrollbar {
  height: 4px;
}

.result-display::-webkit-scrollbar-track {
  background: #e8f5e8;
}

.result-display::-webkit-scrollbar-thumb {
  background: #28a745;
  border-radius: 2px;
}

/* Desktop - tetap 1 baris */
@media (min-width: 769px) {
  .calc-container {
    flex-direction: row;
  }

  .calc-row {
    flex-wrap: nowrap;
  }
}

/* Tablet */
@media (max-width: 768px) and (min-width: 481px) {
  .calc-row {
    gap: 6px;
  }

  .calc-display,
  .calc-input,
  .operator-btn,
  .percent-btn,
  .equals-btn,
  .clear-btn,
  .result-display {
    font-size: 16px;
    padding: 10px;
    min-width: 40px;
  }

  .calc-display,
  .calc-input,
  .result-display {
    max-width: 80px;
  }
}

/* Mobile - 2 baris */
@media (max-width: 480px) {
  .calculator-container {
    padding: 15px 10px;
  }

  .calc-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .calc-container {
    flex-direction: column;
    gap: 12px;
  }

  .calc-row {
    gap: 8px;
    width: 100%;
    justify-content: center;
  }

  .calc-display,
  .calc-input,
  .operator-btn,
  .percent-btn,
  .equals-btn,
  .clear-btn,
  .result-display {
    font-size: 20px;
    padding: 0px;
    max-width: 3px;
    flex: 1;
  }

  .calc-display,
  .calc-input,
  .result-display {
    max-width: none;
  }

  .operator-header-btn {
    font-size: 14px;
    padding: 6px 8px;
    min-width: 30px;
  }

  /* Baris pertama: Input1, Operator, Input2 */
  .row-1 {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  /* Baris kedua: %, =, C, Hasil */
  .row-2 {
    display: flex;
    gap: 8px;
    width: 100%;
  }
}

.subscription-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9em;
}

.badge-trial {
  background: #fff3e0;
  color: #ef6c00;
}

.badge-pro {
  background: #e8f5e8;
  color: #2e7d32;
}