/**
 * Text Case Converter Styles
 */

.text-case-converter-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.text-case-converter-container h3 {
    margin-bottom: 2rem;
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-input-section {
    margin-bottom: 2rem;
}

.text-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.text-input-section textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #ffffff;
}

.text-input-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.case-controls {
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #555;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.case-btn {
    padding: 0.875rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: fit-content;
}

.case-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.case-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
}

.text-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    position: relative;
}

.checkbox-item:hover {
    background: #f8fafc;
    transform: translateX(2px);
}

.checkbox-item:active {
    transform: translateX(0);
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.checkbox-item:hover .checkmark {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    border-radius: 1px;
}

.checkbox-item input[type="checkbox"]:focus + .checkmark {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    flex: 1;
}

/* Style text when checkbox is checked */
.checkbox-item input[type="checkbox"]:checked ~ .checkbox-label {
    color: #667eea;
    font-weight: 600;
}

.text-output-section {
    margin-bottom: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.output-header label {
    font-weight: 600;
    color: #555;
}

.output-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.undo-btn, .copy-btn, .clear-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.undo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.undo-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.undo-btn:active:not(.disabled) {
    transform: translateY(0);
}

.undo-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #9ca3af;
}

.undo-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.copy-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.clear-btn {
    background: #dc3545;
    color: white;
}

.clear-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

#text-output {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #f8fafc;
    color: #1f2937;
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    background: #f8f9fa;
    resize: vertical;
    box-sizing: border-box;
}

.text-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stat-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.stat-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item span {
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.case-examples {
    margin-bottom: 2rem;
}

.case-examples h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.example-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.example-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.example-item.hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.example-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.875rem;
}

.example-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    word-break: break-all;
}

.text-tools {
    margin-bottom: 2rem;
}

.text-tools h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.tool-btn {
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.tool-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
}

.text-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
}

.text-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.text-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Keyboard shortcut hints */
.text-input-section::after {
    content: '💡 Tip: Use Ctrl+Enter for UPPERCASE, Ctrl+Shift+Enter for lowercase';
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .text-case-converter-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .case-btn {
        flex: 0 1 auto;
        min-width: 100px;
    }
    
    .text-options {
        grid-template-columns: 1fr;
    }
    
    .output-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .output-controls {
        justify-content: center;
    }
    
    .text-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-actions {
        flex-direction: column;
    }
    
    .case-btn {
        width: 100%;
        min-width: unset;
    }
    
    .text-stats {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .text-input-section::after {
        content: '💡 Tip: Use keyboard shortcuts for quick conversion';
    }
}

/* Animation for text processing */
.text-case-converter-container.processing {
    opacity: 0.7;
    pointer-events: none;
}

.text-case-converter-container.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus states for accessibility */
.text-input-section textarea:focus,
#text-output:focus {
    outline: none;
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

/* Button focus states */
.case-btn:focus,
.tool-btn:focus,
.copy-btn:focus,
.clear-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.3);
}

/* Smooth transitions */
.text-case-converter-container * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
} 