/* Custom Styles for TextToolsHub */
/* NOTE: This file uses regular CSS (not @apply) for Tailwind CDN compatibility */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* Tool Container Styles */
.tool-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .tool-container {
        padding: 2rem;
    }
}

.tool-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
    resize: vertical;
    min-height: 200px;
    font-family: monospace;
    font-size: 0.875rem;
}

.tool-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.tool-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.tool-button:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #4b5563;
    color: #ffffff;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.tool-button-secondary:hover {
    background-color: #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tool-button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid #2563eb;
    color: #2563eb;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    background: transparent;
    cursor: pointer;
}

.tool-button-outline:hover {
    background-color: #eff6ff;
}

/* Stats Display */
.stat-card {
    background: linear-gradient(to bottom right, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1d4ed8;
}

.stat-label {
    font-size: 0.875rem;
    color: #2563eb;
    margin-top: 0.25rem;
}

/* Ad Placeholder Styles */
.ad-placeholder {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Premium Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse-subtle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
}

.tool-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #93c5fd;
    transform: translateY(-4px);
}

.tool-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(to bottom right, #3b82f6, #1d4ed8);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* FAQ Styles */
.faq-item {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: #374151;
    line-height: 1.625;
}

/* Alert/Notification Styles */
.alert-success {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #166534;
    padding: 1rem;
    border-radius: 0.25rem;
}

.alert-error {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.25rem;
}

.alert-info {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    padding: 1rem;
    border-radius: 0.25rem;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #374151;
    padding: 0.75rem;
    border-bottom: 2px solid #d1d5db;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background-color: #f9fafb;
}

/* Premium Button Hover Effects */
.btn-premium {
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-premium:hover::before {
    width: 300px;
    height: 300px;
}

/* Copy Feedback Animation */
@keyframes copySuccess {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.copy-success {
    animation: copySuccess 0.3s ease-in-out;
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    /* Prevent horizontal overflow site-wide */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .tool-container {
        padding: 1rem;
    }

    /* Make all tool buttons full-width on mobile */
    .tool-button,
    .tool-button-secondary,
    .tool-button-outline {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Stack button containers vertically on mobile */
    .flex.flex-wrap.gap-4 {
        flex-direction: column;
    }

    .flex.flex-wrap.gap-4>button {
        width: 100%;
    }

    /* Fix any fixed-width containers that could overflow on small screens */
    .max-w-sm,
    .max-w-md {
        max-width: 100%;
    }
}

/* Info boxes for articles */
.info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.tip-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.example-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #10b981;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.example-box h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #065f46;
}

.warning-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}