/* 
 * Scoped CSS for Developer Tools
 * This completely replaces the need for Tailwind CDN and safely styles 
 * all 20 tools without affecting the rest of the website.
 */

.nr-tool-container {
    background-color: #1f2937; /* dark:bg-gray-800 */
    border: 1px solid #374151; /* dark:border-gray-700 */
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 64rem; /* max-w-5xl */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nr-tool-container .px-6.py-5 {
    padding: 1.25rem 1.5rem;
    background-color: rgba(31, 41, 55, 0.5); /* dark:bg-gray-800/50 */
    border-bottom: 1px solid #374151; /* dark:border-gray-700 */
}

.nr-tool-container h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.nr-tool-container p {
    font-size: 0.875rem;
    color: #9ca3af; /* text-gray-400 */
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.nr-tool-container .p-6 {
    padding: 1.5rem;
}

/* Forms & Inputs */
.nr-tool-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db; /* text-gray-300 */
    margin-bottom: 0.5rem;
}

.nr-tool-container input[type="text"],
.nr-tool-container input[type="number"],
.nr-tool-container textarea,
.nr-tool-container select {
    width: 100%;
    padding: 0.75rem;
    background-color: #111827; /* dark:bg-gray-900 */
    border: 1px solid #374151; /* dark:border-gray-700 */
    border-radius: 0.5rem;
    color: #d1d5db; /* dark:text-gray-300 */
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.nr-tool-container textarea {
    height: 16rem; /* h-64 default */
    resize: vertical;
}

.nr-tool-container input[type="text"]:focus,
.nr-tool-container input[type="number"]:focus,
.nr-tool-container textarea:focus,
.nr-tool-container select:focus {
    border-color: #3b82f6; /* focus:ring-blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.nr-tool-container input[readonly],
.nr-tool-container textarea[readonly] {
    opacity: 0.8;
}

/* Buttons */
.nr-tool-container button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nr-tool-container button.bg-blue-600,
.nr-tool-container button.bg-green-600 {
    background-color: #2563eb;
    color: #ffffff;
}

.nr-tool-container button.bg-blue-600:hover { background-color: #1d4ed8; }
.nr-tool-container button.bg-green-600 { background-color: #16a34a; }
.nr-tool-container button.bg-green-600:hover { background-color: #15803d; }

.nr-tool-container button.bg-gray-200 {
    background-color: #374151; /* dark:bg-gray-700 */
    color: #ffffff;
}
.nr-tool-container button.bg-gray-200:hover {
    background-color: #4b5563; /* dark:hover:bg-gray-600 */
}

/* Layout Utilities inside tools */
.nr-tool-container .flex {
    display: flex;
}
.nr-tool-container .flex-wrap {
    flex-wrap: wrap;
}
.nr-tool-container .gap-3 {
    gap: 0.75rem;
}
.nr-tool-container .gap-4 {
    gap: 1rem;
}
.nr-tool-container .mt-4 {
    margin-top: 1rem;
}
.nr-tool-container .mb-4 {
    margin-bottom: 1rem;
}
.nr-tool-container .ml-auto {
    margin-left: auto;
}
.nr-tool-container .w-full {
    width: 100%;
}
.nr-tool-container .grid {
    display: grid;
    gap: 1rem;
}
@media (min-width: 768px) {
    .nr-tool-container .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Misc */
.nr-tool-container .text-red-500 {
    color: #ef4444;
}
.nr-tool-container .hidden {
    display: none !important;
}
