/* Digital Business Card Plugin - Bootstrap Custom Styles */

/* Brand Colors */
:root {
  --dbc-blue: #194357;
  --dbc-lime: #95d006;
}

.bg-dbc-blue{
  background-color: var(--dbc-blue) !important;
}

.text-dbc-blue{
  color: var(--dbc-blue) !important;
}

.text-dbc-green{
  color: var(--dbc-lime) !important;
}

.bg-dbc-green{
  background-color: var(--dbc-lime) !important;
}

.accordion-item.product-entry h2.accordion-header {
  margin: 0;
}

form.woocommerce-ResetPassword.lost_reset_password {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
  margin-top: 5rem;
}

form.woocommerce-ResetPassword>p:nth-child(1) {
  font-size: large;
  font-weight: 600;
  text-align: center;
}

p.woocommerce-form-row.woocommerce-form-row--first.form-row.form-row-first {
  width: 100%;
  text-align: center;
  font-weight: 500;
}

form.woocommerce-ResetPassword.lost_reset_password button {
  width: 100%;
}

/* ========== Card Public Styles ========== */
.dbc-card-public {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  max-width: 100%;
  margin: 1rem auto;
  width: 100%;
  max-width: 440px;
}

.dbc-card-views {
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.dbc-card-profile-logo {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.dbc-profile-photo {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
}

.dbc-logo-overlay {
  position: absolute;
  top: -2rem;
  left: -2rem;
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  background: white;
  object-fit: contain;
  border: 2px solid white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dbc-logo-main {
  width: 8rem;
  height: 8rem;
  border-radius: 0.5rem;
  background: white;
  object-fit: contain;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dbc-card-names {
  text-align: center;
  margin-top: 1rem;
}

.dbc-business-name {
  font-size: 1.125rem;
  font-weight: bold;
}

.dbc-user-name {
  font-size: 1rem;
}

.dbc-user-role {
  color: #6b7280;
}

/* ========== Card Actions ========== */
.dbc-card-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.dbc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dbc-btn:hover {
  background: #dbeafe;
}

.dbc-card-share-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dbc-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dbc-share-btn:hover {
  background: #f0f9ff;
}

/* ========== Form Styles ========== */
.dbc-form-outer input,
.dbc-form-outer select,
.dbc-form-outer textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: white;
  color: #1f2937;
}

.dbc-form-outer input:focus,
.dbc-form-outer select:focus,
.dbc-form-outer textarea:focus {
  outline: none;
  border-color: var(--dbc-blue);
  box-shadow: 0 0 0 3px rgba(25, 67, 87, 0.1);
}

.dbc-form-outer input[type="file"] {
  font-size: 0.875rem;
  color: #6b7280;
}

.dbc-form-outer input[type="file"]::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #2563eb;
  cursor: pointer;
}

.dbc-form-outer input[type="file"]::file-selector-button:hover {
  background: #e5e7eb;
}

.dbc-form-outer label>span {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.dbc-form-outer fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.dbc-form-outer legend {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  border-radius: 0.375rem;
}

/* ========== Hide Default Page Elements ========== */
header#masthead,
footer#colophon,
header.entry-header,
footer.entry-footer {
  display: none !important;
}

.page-content>*,
.entry-content>* {
  margin-inline: auto;
  max-width: none;
}

/* ========== Form Layout ========== */
/* Bootstrap grid now handles form layout via col-lg-8 and col-lg-4 */

/* ========== Dashboard Header ========== */
img#header-logo {
  max-width: 200px;
}

header.dbc-dashboard-header {
  background: var(--dbc-blue) !important;
}

nav#header-nav>a {
  color: var(--dbc-lime);
  text-decoration: none;
  transition: opacity 0.3s;
}

nav#header-nav>a:hover {
  opacity: 0.8;
}

button#wc-cart-toggle {
  color: var(--dbc-lime);
}

button#wc-cart-toggle>span {
  top: -3px;
  right: -17px;
  font-size: x-small;
}

/* ========== Dashboard Footer ========== */
footer#dbc-dashboard-footer {
  background: var(--dbc-blue);
}

footer#dbc-dashboard-footer>nav>a {
  color: var(--dbc-lime);
  text-decoration: none;
  transition: opacity 0.3s;
}

footer#dbc-dashboard-footer>nav>a:hover {
  opacity: 0.8;
}

/* ========== Login Form ========== */
.dbc-login-form input[type="text"],
.dbc-login-form input[type="password"],
.dbc-login-form input[type="email"] {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

.dbc-login-form input[type="text"]:focus,
.dbc-login-form input[type="password"]:focus,
.dbc-login-form input[type="email"]:focus {
  outline: none;
  border-color: var(--dbc-blue);
  box-shadow: 0 0 0 3px rgba(25, 67, 87, 0.1);
}

.dbc-login-form input[type="checkbox"] {
  margin-right: 0.5rem;
  vertical-align: middle;
}

.dbc-login-form label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.dbc-login-form input[type="submit"] {
  background: var(--dbc-blue);
  color: white;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  width: 100%;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dbc-login-form input[type="submit"]:hover {
  background: var(--dbc-lime);
}

/* ========== Alpine.js Utilities ========== */
[x-cloak] {
  display: none !important;
}

/* ========== Mobile Styles ========== */
@media (max-width: 768px) {
  .dbc-card-public {
    padding: 0.75rem;
    max-width: 100%;
    margin: 0.5rem auto;
  }

  .dbc-profile-photo {
    width: 6rem;
    height: 6rem;
  }

  .dbc-logo-overlay {
    top: -1.5rem;
    left: -1.5rem;
    width: 3rem;
    height: 3rem;
  }

  .dbc-logo-main {
    width: 6rem;
    height: 6rem;
  }

  .dbc-business-name {
    font-size: 1rem;
  }

  .dbc-user-name {
    font-size: 0.9rem;
  }

  .dbc-card-actions {
    gap: 1rem;
    margin: 1rem 0;
  }

  .dbc-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .dbc-card-share-row {
    gap: 0.75rem;
  }

  .dbc-share-btn {
    width: 2rem;
    height: 2rem;
  }

  .dbc-form-outer input,
  .dbc-form-outer select,
  .dbc-form-outer textarea {
    font-size: 16px;
  }

  .dbc-form-outer fieldset {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .dbc-form-outer legend {
    font-size: 0.9rem;
  }

  img#header-logo {
    max-width: 150px;
  }

  button#wc-cart-toggle>span {
    right: -12px;
  }
}

/* ========== Extra Small Devices (up to 540px) ========== */
@media (max-width: 540px) {
  .dbc-card-public {
    padding: 0.5rem;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    margin-left: calc(-50vw + 50%);
  }

  .dbc-card-content {
    width: 100%;
  }

  /* Scale profile photo and logo appropriately */
  .dbc-profile-photo {
    width: 5.5rem;
    height: 5.5rem;
    font-size: 2.5rem;
  }

  .dbc-profile-photo i {
    font-size: 2.5rem;
  }

  .dbc-logo-overlay {
    top: -1.25rem;
    left: -1.25rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .dbc-logo-main {
    width: 5.5rem;
    height: 5.5rem;
  }

  /* ========== Bootstrap Font Size Overrides ========== */
  /* Boost Bootstrap fs-* classes for mobile readability */
  .dbc-card-public .fs-1 {
    font-size: 2rem !important;
  }

  .dbc-card-public .fs-2 {
    font-size: 1.75rem !important;
  }

  .dbc-card-public .fs-3 {
    font-size: 1.5rem !important;
  }

  .dbc-card-public .fs-4 {
    font-size: 1.25rem !important;
  }

  .dbc-card-public .fs-5 {
    font-size: 1.1rem !important;
  }

  .dbc-card-public .fs-6 {
    font-size: 1rem !important;
  }

  /* Scale text sizes */
  .dbc-business-name {
    font-size: 1.1rem;
  }

  .dbc-user-name {
    font-size: 0.95rem;
  }

  .dbc-user-role {
    font-size: 0.85rem;
  }

  div#dbc-section-name {
    font-size: 1.75rem;
  }

  /* ========== Icon Scaling ========== */
  /* Scale icon sizes in contact section and throughout */
  section#dbc-section-contact i {
    font-size: 1.25rem !important;
  }

  /* Sharing button icons - use fixed sizes instead of fs-4 */
  .dbc-share-btn i {
    font-size: 1.25rem !important;
  }

  /* Eye icon in view counter */
  #dbc-card-views i {
    font-size: 1.5rem !important;
  }

  /* General icon sizing across card */
  .dbc-card-public i {
    font-size: 1.1rem !important;
  }

  /* Sharing buttons with fixed dimensions instead of percentages */
  .dbc-card-actions {
    gap: 0.75rem;
    margin: 0.75rem 0;
  }

  .dbc-btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  .dbc-card-share-row {
    gap: 0.5rem;
  }

  .dbc-share-btn {
    width: 1.75rem;
    height: 1.75rem;
  }

  .dbc-card-section {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .dbc-card-section-title {
    font-size: 0.95rem;
    padding: 0.35rem;
  }

  /* Improve touch targets */
  nav#dbc-card-sticky-menu a.dbc-menu-item {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
  }

  /* Override sharing buttons to be larger on mobile */
  @media (max-width: 540px) {
    .dbc-share-btn {
      width: 2.5rem;
      height: 2.5rem;
    }
  }
}

@media (max-width: 480px) {
  .dbc-card-public {
    padding: 0.5rem;
    margin: 0.25rem auto;
  }

  .dbc-profile-photo {
    width: 5rem;
    height: 5rem;
  }

  .dbc-logo-overlay {
    top: -1rem;
    left: -1rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .dbc-logo-main {
    width: 5rem;
    height: 5rem;
  }

  .dbc-business-name {
    font-size: 0.9rem;
  }

  .dbc-user-name {
    font-size: 0.8rem;
  }

  .dbc-user-role {
    font-size: 0.75rem;
  }

  .dbc-card-actions {
    gap: 0.75rem;
    margin: 0.75rem 0;
  }

  .dbc-btn {
    width: 2rem;
    height: 2rem;
  }

  .dbc-card-share-row {
    gap: 0.5rem;
  }

  .dbc-share-btn {
    width: 1.75rem;
    height: 1.75rem;
  }

  .dbc-form-outer input,
  .dbc-form-outer select,
  .dbc-form-outer textarea {
    padding: 0.375rem 0.5rem;
    font-size: 16px;
  }

  .dbc-form-outer input[type="file"]::file-selector-button {
    margin-right: 0.5rem;
    padding: 0.375rem 0.75rem;
  }

  .dbc-form-outer fieldset {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .dbc-login-form input[type="text"],
  .dbc-login-form input[type="password"],
  .dbc-login-form input[type="email"] {
    font-size: 16px;
  }

  img#header-logo {
    max-width: 120px;
  }

  #dbc-premium-checkout-form {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .btn-close.position-absolute.top-0.end-0.mt-3.me-3 {
    margin-right: 0 !important;
    margin-top: 0 !important;
  }

  #dbc-card-form {
    padding: 0 !important;
  }

  #business-card-form-cont {
    padding: 0;
    margin-bottom: 3rem;
  }

  #dbc_card_submit {
    margin: 1rem;
    box-sizing: border-box;
    width: 90% !important;
  }

  #dbc-card-preview {
    padding-left: 5px;
  }

  .woocommerce-checkout {
    padding: 1rem;
  }

  .woocommerce-checkout>#content {
    padding: 1rem !important;
  }

  .wp-block-woocommerce-checkout.alignwide.wc-block-checkout {
    padding: 1rem;
  }

  #order-notes {
    display: none;
  }

  .wc-block-components-checkout-return-to-cart-button {
    display: none;
  }

  .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.contained {
    width: 100%;
    border-radius: 5px;
    font-size: large;
    max-height: 30px;
    background: #194357;
    border-color: #194357;
    color: #95d006;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
  }

  .wc-block-components-order-summary-item__image {
    display: none !important;
  }

  .wc-block-components-order-summary-item__individual-prices.price.wc-block-components-product-price {
    display: none;
  }

  .wc-block-components-order-summary-item__total-price {
    padding-top: 30px;
  }

  .wc-block-checkout__terms.wc-block-checkout__terms--with-separator.wp-block-woocommerce-checkout-terms-block {
    padding: 0;
    margin: 0;
    text-align: center;
    position: relative;
    top: 16px;
    font-weight: bold;
    color: #194357;
  }

  #dbc-welcome-heading {
    padding: 1rem !important;
    text-align: center;
  }

  #dbc-welcome-heading>span.mb-2 {
    display: block;
    width: 100%;
    font-size: x-large !important;
  }

}