/* Bold Text Converter Styles */

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    word-wrap: break-word;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.warning {
    background-color: #f59e0b;
}

/* Style card active state */
.font-style-card.active {
    border-color: #3b82f6 !important;
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.font-style-card.active h3 {
    color: #3b82f6;
}

/* Hover effects for interactive elements */
.font-style-card:hover {
    transform: translateY(-2px);
}

/* Button animations */
button:active {
    transform: scale(0.98);
}

/* Output text area styling */
#outputText.empty-state {
    color: #9ca3af;
    font-style: italic;
}

#outputContainer.has-content #outputText {
    color: #1f2937;
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    min-height: 120px;
}

/* Toggle switch custom styling */
.toggle-bg {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    background-color: #d1d5db;
    border-radius: 24px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.toggle-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

input:checked + .toggle-bg {
    background-color: #3b82f6;
}

input:checked + .toggle-bg .toggle-dot {
    transform: translateX(24px);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .font-style-card {
        margin-bottom: 16px;
    }

    .notification {
        right: 16px;
        left: 16px;
        max-width: none;
    }

    #stylesGrid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Focus styles for accessibility */
.font-style-card:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

textarea:focus,
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: #3b82f6;
}

/* Animation for style cards loading */
.font-style-card {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Character count styling */
.char-count {
    font-size: 0.875rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.danger {
    color: #ef4444;
}

/* Stats display styling */
.output-stats {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Disabled button styling */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Category badge styling variations */
.category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

/* Improved scroll styling for output areas */
#outputText {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

#outputText::-webkit-scrollbar {
    width: 8px;
}

#outputText::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 4px;
}

#outputText::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#outputText::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Enhanced preview text styling */
.preview-text {
    font-family: inherit;
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: 0.025em;
}

/* Improved hover states */
.font-style-card:hover .preview-text {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Better focus indicators */
.font-style-card:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
    border-color: transparent;
}

/* Smooth transitions for all interactive elements */
* {
    transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Print styles */
@media print {
    .notification,
    button,
    .font-style-card {
        display: none !important;
    }

    #outputText {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
}
