/* Debug Mode Styles */
.debug-mode * {
    outline: 1px solid rgba(0, 255, 255, 0.3) !important;
    /* Cyan outline */
    background: rgba(0, 255, 255, 0.02) !important;
    /* Subtle tint */
    position: relative;
}

.debug-mode img {
    opacity: 0.7;
    filter: grayscale(100%);
}

.debug-mode .debug-overlay.home-hero {
    grid-column-gap: 2rem;
    grid-row-gap: 2rem;
    flex-flow: column;
    padding-top: 10vh;
    /* moved up a bit */
    display: flex;
}

.debug-mode .debug-overlay-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

.debug-indicator {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff !important;
    /* white background */
    color: #000 !important;
    /* black text */
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 8px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 600;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.debug-mode .debug-indicator:hover {
    background: #fff !important;
    border-color: #999;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    outline: none !important;
}

.debug-mode .debug-indicator *:hover {
    background: transparent !important;
    outline: none !important;
}

.debug-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ffff;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Spacing Inspector Tooltip */
.debug-spacing-tooltip {
    position: fixed;
    background: #fff !important;
    border: none !important;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: #000;
    z-index: 10002;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    outline: none !important;
}

.debug-spacing-tooltip .spacing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0;
    gap: 12px;
    background: transparent !important;
    outline: none !important;
}

.debug-spacing-tooltip .spacing-label {
    color: #666 !important;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
    background: transparent !important;
    outline: none !important;
}

.debug-spacing-tooltip .spacing-value {
    color: #000 !important;
    font-weight: bold;
    font-size: 11px;
    background: transparent !important;
    outline: none !important;
}

.debug-spacing-tooltip .spacing-value.padding {
    color: #ff6b6b !important;
}

.debug-spacing-tooltip .spacing-value.margin {
    color: #ffa500 !important;
}

.debug-spacing-tooltip .spacing-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1) !important;
    margin: 4px 0;
    outline: none !important;
}

/* Highlight hovered element */
.debug-mode *:hover {
    outline: 2px solid #00ffff !important;
    background: rgba(0, 255, 255, 0.08) !important;
}

/* Padding Overlay - Figma-style */
.debug-padding-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background: rgba(255, 107, 107, 0.15) !important;
    outline: 1px solid rgba(255, 107, 107, 0.5) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.3);
}

/* Margin Overlay Container */
.debug-margin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* Margin Boxes */
.debug-margin-box {
    position: fixed;
    background: rgba(255, 165, 0, 0.15) !important;
    outline: 1px solid rgba(255, 165, 0, 0.5) !important;
    pointer-events: none;
}

/* Gap Overlay Container */
.debug-gap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
}

/* Gap Boxes */
.debug-gap-box {
    position: fixed;
    background: rgba(138, 43, 226, 0.2) !important;
    outline: 1px dashed rgba(138, 43, 226, 0.6) !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gap Labels */
.debug-gap-label {
    background: rgba(138, 43, 226, 0.9) !important;
    color: #fff !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    outline: none !important;
}

/* Measurement Lines Container */
.debug-measurement-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Measurement Lines */
.debug-measure-line {
    position: fixed;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debug-measure-line.debug-measure-padding {
    background: rgba(255, 107, 107, 0.6) !important;
}

.debug-measure-line.debug-measure-margin {
    background: rgba(255, 165, 0, 0.6) !important;
}

/* Measurement Labels */
.debug-measure-label {
    position: absolute;
    background: #fff !important;
    color: #000 !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    outline: none !important;
    z-index: 10001;
}

/* Exclude debug overlays from hover effects */
.debug-mode .debug-padding-overlay:hover,
.debug-mode .debug-margin-overlay:hover,
.debug-mode .debug-margin-box:hover,
.debug-mode .debug-gap-overlay:hover,
.debug-mode .debug-gap-box:hover,
.debug-mode .debug-gap-label:hover,
.debug-mode .debug-measurement-lines:hover,
.debug-mode .debug-measure-line:hover,
.debug-mode .debug-measure-label:hover {
    outline: none !important;
    background: inherit !important;
}