/* Custom styles for Toolbox */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: auto;
}

/* =============================================================================
   ENVIRONMENT SAFETY INDICATORS
   Colors: Blue = Development, Green = Staging, Red = Production
   ============================================================================= */

/* 1. Environment Border - Fixed border around entire viewport */
.env-border {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    border: 5px solid transparent;
}

.env-border-development,
.env-border-local {
    border-color: #1d9bf0; /* Twitter Blue */
    box-shadow: inset 0 0 15px rgba(29, 155, 240, 0.1);
}

.env-border-staging {
    border-color: #22c55e; /* Green */
    box-shadow: inset 0 0 20px rgba(34, 197, 94, 0.15);
}

.env-border-production {
    border-color: #ef4444; /* Red */
    box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.2),
                0 0 15px rgba(239, 68, 68, 0.3);
    animation: production-glow 2s ease-in-out infinite;
}

@keyframes production-glow {
    0%, 100% {
        box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.2),
                    0 0 15px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.25),
                    0 0 25px rgba(239, 68, 68, 0.4);
    }
}

/* 2. Background tint for entire page */
.env-development,
.env-local {
    background-color: #eff6ff !important; /* Very light blue wash */
}

.env-staging {
    background-color: #f0fdf4 !important; /* Very light green wash */
}

.env-production {
    background-color: #fef2f2 !important; /* Very light red wash */
}

/* 3. Header bar styling per environment */
.header-bar {
    padding: 1rem 1.5rem;
    border-bottom-width: 3px;
    border-bottom-style: solid;
}

.header-bar-development,
.header-bar-local {
    background-color: #1d9bf0; /* Twitter Blue */
    border-bottom-color: #1a8cd8;
    color: white;
}

.header-bar-development a,
.header-bar-local a {
    color: white;
}

.header-bar-staging {
    background-color: #22c55e; /* Green */
    border-bottom-color: #16a34a;
    color: white;
}

.header-bar-staging a {
    color: white;
}

.header-bar-production {
    background-color: #ef4444; /* Red */
    border-bottom-color: #dc2626;
    color: white;
}

.header-bar-production a {
    color: white;
}

/* 4. Environment badge in header */
.env-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.env-badge-development,
.env-badge-local {
    background-color: #3b82f6; /* Blue-500 - primary color pop */
    color: white;
    border: 2px solid #60a5fa; /* Blue-400 */
}

.env-badge-staging {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.env-badge-production {
    background-color: white;
    color: #ef4444;
    border: 2px solid white;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 5. Watermark for staging/production */
.env-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(239, 68, 68, 0.07); /* Red, very transparent */
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
    letter-spacing: 0.1em;
    user-select: none;
}

.env-watermark-staging {
    color: rgba(34, 197, 94, 0.07); /* Green, very transparent */
}

/* Status indicator animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth transitions */
.transition-height {
    transition: height 0.1s ease-out;
}

/* Log terminal styling */
.log-terminal {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Collapsible panel animations */
.collapse-content {
    overflow: hidden;
    transition: max-height 0.2s ease-out, opacity 0.2s ease-out;
}

.collapse-content[data-collapsed="true"] {
    max-height: 0;
    opacity: 0;
}

.collapse-content[data-collapsed="false"] {
    max-height: 2000px;
    opacity: 1;
}

/* Card hover lift animation */
.card-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-lift:hover {
    transform: translateY(-2px);
}

/* =============================================================================
   MOBILE TOUCH TARGETS
   Minimum 44px touch targets for accessibility (Apple/Google guidelines)
   ============================================================================= */

@media (max-width: 768px) {
    /* Increase button minimum height for touch */
    .touch-target,
    button,
    a.px-3 {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Service card buttons */
    .service-card button,
    .tool-card button {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }

    /* Quick links - slightly larger padding */
    .bg-white.rounded-lg a.px-2 {
        padding: 0.5rem 0.75rem;
        min-height: 36px;
    }

    /* Collapsible section headers - larger tap area */
    button.w-full.flex {
        min-height: 52px;
    }
}

/* =============================================================================
   RELEASE WATERMARK
   Scrolls with content, visible at bottom of page
   ============================================================================= */
.release-watermark {
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: rgba(156, 163, 175, 0.7);
    text-align: right;
    padding: 12px 24px;
    pointer-events: none;
    user-select: none;
}

.release-watermark .commit {
    font-weight: 500;
}
