/* Text Case Converter Styles v1.0.0 */

.tcc-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    box-sizing: border-box;
}

.tcc-container * {
    box-sizing: border-box;
}

/* Light Theme */
.tcc-light-theme {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
}

/* Dark Theme */
.tcc-dark-theme {
    background: #2d2d2d;
    color: #f0f0f0;
    border: 1px solid #404040;
}

.tcc-dark-theme .tcc-textarea {
    background: #1a1a1a;
    color: #f0f0f0;
    border-color: #404040;
}

.tcc-dark-theme .tcc-btn-primary {
    background: #4a90e2;
    color: #ffffff;
}

.tcc-dark-theme .tcc-btn-secondary {
    background: #3a3a3a;
    color: #f0f0f0;
    border-color: #555555;
}

/* Header */
.tcc-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.tcc-dark-theme .tcc-header {
    border-bottom-color: #404040;
}

.tcc-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.tcc-dark-theme .tcc-title {
    color: #f0f0f0;
}

.tcc-subtitle {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
}

.tcc-dark-theme .tcc-subtitle {
    color: #b0b0b0;
}

/* Input Section */
.tcc-input-section {
    margin-bottom: 20px;
}

.tcc-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Courier New', Courier, monospace;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
    color: #333;
}

.tcc-textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.tcc-char-count {
    margin-top: 8px;
    font-size: 13px;
    color: #7f8c8d;
    text-align: right;
}

.tcc-dark-theme .tcc-char-count {
    color: #b0b0b0;
}

/* Buttons Section */
.tcc-buttons-section {
    margin-bottom: 25px;
}

.tcc-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.tcc-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.tcc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tcc-btn:active {
    transform: translateY(0);
}

.tcc-btn-icon {
    font-size: 16px;
}

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

.tcc-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.tcc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.tcc-btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Output Section */
.tcc-output-section {
    margin-bottom: 20px;
}

.tcc-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tcc-output-label {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
}

.tcc-dark-theme .tcc-output-label {
    color: #f0f0f0;
}

.tcc-btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tcc-btn-copy {
    background: #28a745;
    color: white;
}

.tcc-btn-copy:hover {
    background: #218838;
}

.tcc-btn-copy.copied {
    background: #5cb85c;
}

.tcc-output-textarea {
    background: #f8f9fa !important;
    cursor: default;
}

.tcc-dark-theme .tcc-output-textarea {
    background: #1a1a1a !important;
}

/* Action Buttons */
.tcc-action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tcc-btn-clear {
    flex: 1;
    min-width: 150px;
    background: #e74c3c;
    color: white;
}

.tcc-btn-clear:hover {
    background: #c0392b;
}

.tcc-btn-download {
    flex: 1;
    min-width: 150px;
    background: #3498db;
    color: white;
}

.tcc-btn-download:hover {
    background: #2980b9;
}

/* Info Section */
.tcc-info-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.tcc-dark-theme .tcc-info-section {
    border-top-color: #404040;
}

.tcc-help {
    cursor: pointer;
}

.tcc-help summary {
    font-weight: 600;
    font-size: 14px;
    color: #4a90e2;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
    list-style: none;
}

.tcc-help summary::-webkit-details-marker {
    display: none;
}

.tcc-help summary:hover {
    background: #f0f7ff;
}

.tcc-dark-theme .tcc-help summary {
    color: #6ab0f3;
}

.tcc-dark-theme .tcc-help summary:hover {
    background: #2a2a2a;
}

.tcc-help-content {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
}

.tcc-dark-theme .tcc-help-content {
    background: #2a2a2a;
}

.tcc-help-content p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.tcc-help-content strong {
    color: #4a90e2;
}

.tcc-dark-theme .tcc-help-content strong {
    color: #6ab0f3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tcc-container {
        padding: 20px;
    }

    .tcc-title {
        font-size: 24px;
    }

    .tcc-button-row {
        flex-direction: column;
    }

    .tcc-btn {
        min-width: 100%;
    }

    .tcc-action-buttons {
        flex-direction: column;
    }

    .tcc-btn-clear,
    .tcc-btn-download {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .tcc-container {
        padding: 15px;
    }

    .tcc-title {
        font-size: 20px;
    }

    .tcc-textarea {
        font-size: 14px;
        padding: 12px;
    }

    .tcc-output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Animation for button clicks */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 144, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    }
}

.tcc-btn.active {
    animation: pulse 0.5s;
}

/* Loading state */
.tcc-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.tcc-btn.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
