/* Regex Tester Custom Styling */

body {
    background-color: #fcfbfe;
    color: #1f2937; /* gray-800 */
    -webkit-tap-highlight-color: transparent;
}
html.dark body {
    background-color: #030206;
    color: #f3f4f6; /* gray-100 */
}

/* Glassmorphism style cards */
.apple-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #111827; /* gray-900 */
}
html.dark .apple-glass {
    background: rgba(12, 10, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb; /* gray-200 */
}

/* Dual-layer Highlighting Editor Structure */
.highlight-container {
    box-sizing: border-box;
    margin: 0;
    border: 1px solid transparent;
    color: transparent !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    overflow-x: hidden;
    overflow-y: hidden; /* Programmatically scrolled */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    line-height: 1.625 !important; /* leading-normal */
}

#testStringText {
    box-sizing: border-box;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    line-height: 1.625 !important;
    caret-color: #3b82f6; /* Blue caret */
}

/* Match Highlights wrapper inside the transparent background div */
.highlight-container mark {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: transparent !important;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
    padding: 1px 0;
    margin: 0 -1px;
}
html.dark .highlight-container mark {
    background-color: rgba(96, 165, 250, 0.25) !important;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35);
}

/* Highlight specific hover details */
.highlight-container mark.match-active {
    background-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}
html.dark .highlight-container mark.match-active {
    background-color: rgba(96, 165, 250, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6);
}

/* Flag checkbox style indicator states */
.flag-card-selected {
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}
.flag-card-selected .flag-letter-indicator {
    color: #3b82f6 !important;
}
html.dark .flag-card-selected {
    background-color: rgba(96, 165, 250, 0.1) !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}
html.dark .flag-card-selected .flag-letter-indicator {
    color: #60a5fa !important;
}

/* Scrollbar customizations */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
}
html.dark .custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}
html.dark .custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Match details list cards hover feedback */
.match-item-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.match-item-card:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.2);
}
html.dark .match-item-card:hover {
    border-color: rgba(96, 165, 250, 0.25);
}

@media (min-width: 1024px) {
    .sticky-panel {
        position: sticky !important;
        top: 6rem !important;
        align-self: start !important;
    }
}
