/* String Conversion Tool Styles */

/* Tab Navigation Styling */
.tab-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid transparent;
    color: #9CA3AF; /* gray-400 */
    background: transparent;
    border-radius: 0;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.tab-button:hover {
    color: #D1D5DB; /* gray-300 */
    border-bottom-color: #6B7280; /* gray-500 */
}

.tab-button.active {
    color: #3B82F6; /* blue-500 */
    border-bottom-color: #3B82F6; /* blue-500 */
    background: rgba(59, 130, 246, 0.1);
}

.tab-button i {
    font-size: 0.875rem;
}

/* Mobile responsive tabs */
@media (max-width: 640px) {
    .tab-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .tab-button span {
        display: none;
    }
    
    .tab-button i {
        margin-right: 0 !important;
        font-size: 1rem;
    }
}

/* Copy button success state */
#copy-btn.copied {
    background-color: rgb(34 197 94) !important; /* green-500 */
    border-color: rgb(34 197 94) !important;
    color: white !important;
    animation: copy-success 2s ease-in-out;
}

@keyframes copy-success {
    0% { background-color: rgb(34 197 94); }
    20% { background-color: rgb(22 163 74); } /* green-600 */
    40% { background-color: rgb(34 197 94); }
    100% { background-color: rgb(55 65 81); } /* gray-700 */
}

/* Button hover animations */
.btn-primary, .btn-secondary {
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active, .btn-secondary:active {
    transform: translateY(0);
}

/* Input and output textarea styling */
#input-text, #output-text {
    transition: border-color 0.2s ease;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
}

#input-text:focus {
    border-color: #3B82F6 !important; /* blue-500 */
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.2);
}

#output-text {
    background-color: #1F2937 !important; /* gray-800 */
    border: 1px solid #4B5563; /* gray-600 */
}

/* Loading state for convert button */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

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

/* Smooth transitions for content changes */
.content-transition {
    transition: opacity 0.2s ease-in-out;
}

.content-transition.fade-out {
    opacity: 0;
}

.content-transition.fade-in {
    opacity: 1;
}

/* Character count indicator */
.char-count {
    font-size: 0.75rem;
    color: #6B7280; /* gray-500 */
    text-align: right;
    margin-top: 0.25rem;
}

/* Success notification styling */
.success-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: rgb(34 197 94); /* green-500 */
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    z-index: 1000;
    animation: slide-in 0.3s ease-out, slide-out 0.3s ease-in 2.7s forwards;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Enhanced button styling to match existing tools */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    border: none;
    font-weight: 600;
    text-transform: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.btn-secondary {
    background-color: rgb(55 65 81); /* gray-700 */
    border: 1px solid rgb(75 85 99); /* gray-600 */
    color: white;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: rgb(75 85 99); /* gray-600 */
    border-color: rgb(107 114 128); /* gray-500 */
}

/* Fix for missing responsive classes */
@media (min-width: 768px) {
    .md\:block {
        display: block !important;
    }
}

/* Ensure proper tab navigation visibility */

/* L33T Slider Styles (borrowed from password generator) */
.slider-container {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 0.75rem;
    border: 1px solid rgba(75, 85, 99, 0.4);
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #374151;
    outline: none;
    transition: background 0.2s;
    margin: 1rem 0;
}

.slider:hover { 
    background: #4B5563;
}

/* WebKit browsers (Chrome, Safari, Edge) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #ffffff !important; /* White for maximum contrast */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(204, 204, 204, 0.8) !important;
    border: 3px solid #cccccc !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

.slider::-webkit-slider-thumb:hover {
    background: #f0f0f0 !important;
    transform: scale(1.15) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7), inset 0 2px 4px rgba(204, 204, 204, 0.9) !important;
}

/* Firefox */
.slider::-moz-range-thumb {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    cursor: pointer !important;
    border: 3px solid #cccccc !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    -moz-appearance: none !important;
}

.slider::-moz-range-thumb:hover {
    background: #f0f0f0 !important;
}

/* Remove default track styling for Firefox */
.slider::-moz-range-track {
    background: #374151 !important;
    height: 10px !important;
    border-radius: 5px !important;
}

.length-display {
    position: absolute;
    top: -10px;
    right: 0px;
    background: #3b82f6;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid #1d4ed8;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    min-width: 60px;
    text-align: center;
    z-index: 50;
    transform: translateY(-50%);
}
.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .hidden.md\:block {
        display: block !important;
    }
}

/* Ensure dropdown is hidden on desktop */
@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
}

/* Force tab display on desktop */
@media (min-width: 768px) {
    .tab-navigation-desktop {
        display: block !important;
    }
}

/* Force dropdown display on mobile */
@media (max-width: 767px) {
    .tab-navigation-mobile {
        display: block !important;
        position: relative !important;
    }
    .tab-navigation-desktop {
        display: none !important;
    }
}

/* Dropdown styling fixes */
#dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #374151; /* gray-700 */
    border: 1px solid #4B5563; /* gray-600 */
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    margin-top: 4px;
    overflow: hidden;
}

/* Ensure dropdown is visible when shown */
#dropdown {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Ensure dropdown is hidden when needed */
#dropdown.hidden {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Ensure the dropdown container has relative positioning */
.tab-navigation-mobile {
    position: relative;
    width: 100%;
}

.dropdown-option {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #E5E7EB; /* gray-200 */
    font-size: 14px;
    display: flex;
    align-items: center;
    font-family: inherit;
}

.dropdown-option:hover {
    background-color: #4B5563; /* gray-600 */
    color: white;
}

.dropdown-option:focus {
    outline: none;
    background-color: #4B5563; /* gray-600 */
    color: white;
}

.dropdown-option i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    font-size: 14px;
}

/* Custom dropdown button styling */
#dropdownDefaultButton {
    background: #374151 !important; /* gray-700 */
    border: 1px solid #4B5563 !important; /* gray-600 */
    color: #E5E7EB !important; /* gray-200 */
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

#dropdownDefaultButton:hover {
    background: #4B5563 !important; /* gray-600 */
    border-color: #6B7280 !important; /* gray-500 */
    color: white !important;
}

#dropdownDefaultButton:focus {
    outline: none !important;
    ring: 2px !important;
    ring-color: rgba(59, 130, 246, 0.5) !important;
    background: #4B5563 !important;
}

/* Style the dropdown arrow to be smaller and more elegant */
#dropdownDefaultButton svg {
    width: 12px !important;
    height: 12px !important;
    margin-left: 8px !important;
    opacity: 0.7 !important;
    transition: transform 0.2s ease !important;
}

/* Rotate arrow when dropdown is open */
#dropdownDefaultButton:not(.hidden) + #dropdown:not(.hidden) ~ #dropdownDefaultButton svg,
.dropdown-open svg {
    transform: rotate(180deg) !important;
} 