/*
Theme Name: VMTuan Finance & Automation
Theme URI: https://example.com/vmtuan-theme
Author: vmtuan
Author URI: https://example.com
Description: A custom WordPress theme for Finance & Automation professionals.
Version: 1.0.27
Text Domain: vmtuan-theme
*/

:root {
  /* Navy Blue Professional Theme */
  --background: 0 0% 100%;
  --foreground: 220 40% 13%;

  --card: 0 0% 100%;
  --card-foreground: 220 40% 13%;

  --popover: 0 0% 100%;
  --popover-foreground: 220 40% 13%;

  --primary: 220 60% 25%;
  --primary-foreground: 0 0% 100%;

  --secondary: 220 20% 96%;
  --secondary-foreground: 220 40% 13%;

  --muted: 220 15% 95%;
  --muted-foreground: 220 15% 45%;

  --accent: 220 45% 92%;
  --accent-foreground: 220 60% 25%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 220 15% 90%;
  --input: 220 15% 90%;
  --ring: 220 60% 25%;

  --radius: 0.5rem;

  /* Custom Navy tokens */
  --navy: 220 60% 25%;
  --navy-light: 220 45% 35%;
  --navy-dark: 220 65% 15%;
  --gold: 43 74% 49%;
  --gold-light: 43 74% 65%;

  --sidebar-background: 0 0% 98%;
  --sidebar-foreground: 220 40% 13%;
  --sidebar-primary: 220 60% 25%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 220 20% 96%;
  --sidebar-accent-foreground: 220 60% 25%;
  --sidebar-border: 220 15% 90%;
  --sidebar-ring: 220 60% 25%;
}

.dark {
  --background: 220 40% 8%;
  --foreground: 220 10% 95%;

  --card: 220 35% 12%;
  --card-foreground: 220 10% 95%;

  --popover: 220 35% 12%;
  --popover-foreground: 220 10% 95%;

  --primary: 220 50% 55%;
  --primary-foreground: 220 40% 8%;

  --secondary: 220 30% 18%;
  --secondary-foreground: 220 10% 95%;

  --muted: 220 25% 20%;
  --muted-foreground: 220 15% 65%;

  --accent: 220 35% 22%;
  --accent-foreground: 220 10% 95%;

  --destructive: 0 62% 50%;
  --destructive-foreground: 0 0% 100%;

  --border: 220 25% 22%;
  --input: 220 25% 22%;
  --ring: 220 50% 55%;

  --navy: 220 50% 55%;
  --navy-light: 220 45% 65%;
  --navy-dark: 220 55% 45%;

  --sidebar-background: 220 35% 10%;
  --sidebar-foreground: 220 10% 95%;
  --sidebar-primary: 220 50% 55%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 220 30% 18%;
  --sidebar-accent-foreground: 220 10% 95%;
  --sidebar-border: 220 25% 22%;
  --sidebar-ring: 220 50% 55%;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Inter", sans-serif;
}

/* Animations */
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Utility Classes */
.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slide-in-left 0.6s ease-out forwards;
}

.animate-slide-in-right {
  animation: slide-in-right 0.6s ease-out forwards;
}

/* Contact Form 7 Styling */
.wpcf7-form p {
  margin-bottom: 1.5rem;
}

.wpcf7-form label {
  display: block;
  font-size: 0.875rem;
  /* text-sm */
  font-weight: 500;
  /* font-medium */
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 2.875rem;
  border-radius: var(--radius);
  /* rounded-lg */
  border: 1px solid transparent;
  /* border-transparent */
  background-color: color-mix(in srgb, hsl(var(--muted)) 30%, transparent);
  /* bg-muted/30 */
  padding: 0.75rem 1rem;
  /* px-4 py-3 */
  font-size: 1rem;
  /* text-base */
  line-height: 1.5;
  font-weight: 400;
  color: hsl(var(--foreground));
  outline: none;
  transition: all 0.2s;
}

/* Placeholder styling */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

/* Focus state */
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  background-color: hsl(var(--background));
  /* focus:bg-white */
  border-color: hsl(var(--primary));
  /* focus:border-primary */
  box-shadow: 0 0 0 1px hsl(var(--primary));
  /* ring-1 ring-primary */
}

/* Submit Button */
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background-color: hsl(var(--primary));
  padding: 0.75rem 1.5rem;
  /* px-6 py-3 */
  font-weight: 500;
  /* font-medium */
  color: hsl(var(--primary-foreground));
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.wpcf7-submit:hover {
  opacity: 0.9;
  /* hover:bg-primary/90 */
}

/* Loader spinner adjustment if needed */
.wpcf7-spinner {
  margin-left: 10px;
}

/* Editorial comments styling */
#comments hr {
  display: none;
}

#comments .comment-list,
#comments .children {
  list-style: none;
  margin: 0;
  padding: 0;
}

#comments .comment-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#comments .comment-list > .comment {
  margin: 0;
}

#comments .comment-body {
  border: none !important;
  box-shadow: none !important;
  background-color: transparent;
  border-bottom: 1px solid hsl(var(--border)) !important;
  border-radius: 0;
  padding: 0 0 2rem 0;
  margin: 0;
}

#comments .comment-list > .comment:last-child > .comment-body {
  border-bottom: none !important;
  margin-bottom: 0;
  padding-bottom: 0;
}

#comments .comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  color: hsl(var(--muted-foreground));
}

#comments .comment-author {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
}

#comments .says {
  display: none;
}

#comments .avatar,
#comments .comment-author img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px !important;
  border: 1px solid hsl(var(--border));
  object-fit: cover;
}

#comments .comment-author .fn,
#comments .comment-author .fn a {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
}

#comments .comment-metadata {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
}

#comments .comment-metadata::before {
  content: "\00B7";
  margin-right: 0.5rem;
  color: hsl(var(--muted-foreground));
}

#comments .comment-metadata a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

#comments .comment-content {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
}

#comments .comment-content p {
  margin: 0.75rem 0;
  color: hsl(var(--muted-foreground));
  line-height: 1.75;
}

#comments .comment-content strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

#comments .comment-content em {
  font-style: italic;
}

#comments .comment-content blockquote {
  border-left: 3px solid hsl(var(--primary));
  margin: 1rem 0;
  padding-left: 1rem;
  color: hsl(var(--foreground));
  font-family: "Playfair Display", serif;
  font-size: 1.125rem;
}

#comments .comment-content pre,
#comments .comment-content .vmtuan-code-block-wrapper {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

#comments .reply {
  margin-top: 0.75rem;
}

#comments .comment-reply-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

#comments .comment-reply-link:hover,
#comments .comment-reply-link:focus {
  color: hsl(var(--primary));
}

#comments .children {
  margin-top: 1.5rem;
  margin-left: 1.25rem;
  padding-left: 1.5rem;
  border-left: 2px solid hsl(var(--border) / 0.5);
}

#comments .children .children {
  margin-left: 1.25rem;
}

#comments .children .comment-body {
  padding-bottom: 1.75rem;
  margin-bottom: 0;
}

#comments .children .comment:last-child > .comment-body {
  border-bottom: none !important;
  padding-bottom: 0;
  margin-bottom: 0;
}

#comments .logged-in-as,
#comments .comment-notes {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

#comments .must-log-in a {
  text-decoration: none;
}

#comments .form-submit button {
  cursor: pointer;
}

#comments #commentform .vmtuan-comment-editor {
  margin-top: 0.5rem;
  border: 1px solid hsl(var(--input));
  border-radius: 0.75rem;
  background-color: hsl(var(--background));
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#comments #commentform .vmtuan-comment-editor:focus-within {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

#comments #commentform .vmtuan-comment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
  background: color-mix(in srgb, hsl(var(--muted)) 22%, transparent);
}

#comments #commentform .vmtuan-toolbar-btn {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

#comments #commentform .vmtuan-toolbar-btn:hover,
#comments #commentform .vmtuan-toolbar-btn:focus {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  outline: none;
}

#comments #commentform .vmtuan-toolbar-btn.is-active,
#comments #commentform .vmtuan-toolbar-btn[aria-pressed="true"] {
  border-color: hsl(var(--primary));
  background: color-mix(in srgb, hsl(var(--primary)) 12%, hsl(var(--background)));
  color: hsl(var(--primary));
}

#comments #commentform .vmtuan-comment-input {
  min-height: 11rem;
  padding: 1rem;
  line-height: 1.7;
  color: hsl(var(--foreground));
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

#comments #commentform .vmtuan-comment-input:empty::before {
  content: attr(data-placeholder);
  color: hsl(var(--muted-foreground));
}

#comments #commentform .vmtuan-comment-input blockquote {
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid hsl(var(--primary));
  color: hsl(var(--foreground));
}

#comments #commentform .vmtuan-comment-input code {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, hsl(var(--primary)) 14%, hsl(var(--background)));
  border: 1px solid color-mix(in srgb, hsl(var(--primary)) 42%, hsl(var(--border)));
  color: hsl(var(--foreground));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
}

#comments .comment-content p code,
#comments .comment-content li code,
#comments .comment-content blockquote code {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, hsl(var(--primary)) 14%, hsl(var(--background)));
  border: 1px solid color-mix(in srgb, hsl(var(--primary)) 42%, hsl(var(--border)));
  color: hsl(var(--foreground));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
}

.vmtuan-code-block-wrapper {
  position: relative;
  margin: 1.25rem 0;
}

.vmtuan-code-copy-button {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  min-width: 2.05rem;
  height: 2.05rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.96);
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vmtuan-code-copy-button:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0f172a;
}

.vmtuan-code-copy-status {
  position: absolute;
  top: 0.92rem;
  right: 3rem;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.85);
}

.vmtuan-code-block-wrapper pre {
  margin: 0;
  background: linear-gradient(135deg, #20253a 0%, #242b42 100%);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.75rem;
  padding: 1.15rem 1.2rem;
  overflow-x: auto;
}

.vmtuan-code-block-wrapper pre > span {
  display: block;
}

.vmtuan-code-block-wrapper pre code,
#comments .comment-content pre code {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f8fafc !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  font-weight: 500 !important;
  line-height: 1.75;
}

.vmtuan-code-block-wrapper .shcb-language {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.72);
}

#comments #commentform.js-comment-editor-enabled #comment.vmtuan-comment-native {
  display: none !important;
}

#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .comment-notes,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .logged-in-as,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .vmtuan-comment-auth,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .comment-form-author,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .comment-form-email,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .comment-form-cookies-consent,
#comments #commentform.vmtuan-comment-collapsed:not(.is-active) .form-submit {
  display: none;
}

#comments #commentform .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

#comments #commentform .comment-form-cookies-consent input[type="checkbox"] {
  margin-top: 0.15rem;
}

#comments #commentform .comment-form-turnstile {
  margin-top: 0.25rem;
}

#comments #commentform .comment-form-comment #comment {
  border: 1px solid hsl(var(--input)) !important;
  background-color: hsl(var(--background));
}

#comments #commentform .comment-form-comment #comment:focus {
  border-color: hsl(var(--primary)) !important;
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

#comments #commentform .vmtuan-comment-panel {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.3s ease, transform 0.35s ease;
}

#comments #commentform .vmtuan-comment-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.75rem;
}

#comments #commentform.is-active .vmtuan-comment-panel {
  opacity: 1;
  transform: translateY(0);
}
