/* Toozly Text Case Converter Styles */
.toozly-ttcc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #334155;
    margin: 20px 0;
}

.toozly-ttcc-gradient-header {
    background: linear-gradient(135deg, #FF4B6E 0%, #FF9E3D 100%);
    padding: 8px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 75, 110, 0.15);
    border-radius: 14px 14px 0 0;
}

.toozly-ttcc-header-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.toozly-ttcc-converter-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.toozly-ttcc-wrapper .toozly-ttcc-gradient-header + .toozly-ttcc-converter-card {
    border-radius: 0 0 14px 14px;
    border-top: none;
}

.toozly-ttcc-input-section {
    margin-bottom: 20px;
}

.toozly-ttcc-textarea-container {
    position: relative;
    margin-bottom: 16px;
}

.toozly-ttcc-main-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

.toozly-ttcc-main-textarea:focus {
    outline: none;
    border-color: #1A73E8;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.toozly-ttcc-char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.toozly-ttcc-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.toozly-ttcc-case-btn {
    background: #1A73E8;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.toozly-ttcc-case-btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.toozly-ttcc-case-btn:active {
    transform: translateY(0);
}

.toozly-ttcc-utility-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.toozly-ttcc-utility-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toozly-ttcc-utility-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.toozly-ttcc-output-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

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

.toozly-ttcc-output-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.toozly-ttcc-copy-output-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toozly-ttcc-copy-output-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.toozly-ttcc-output-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #f8fafc;
    resize: vertical;
    color: #374151;
    box-sizing: border-box;
}

.toozly-ttcc-output-textarea:focus {
    outline: none;
    border-color: #10b981;
    background: white;
}

.toozly-ttcc-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.toozly-ttcc-keyboard-hint {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 12px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.toozly-ttcc-success-flash {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toozly-ttcc-success-flash.show {
    opacity: 1;
    transform: translateX(0);
}

/* Focus indicators for accessibility */
.toozly-ttcc-case-btn:focus,
.toozly-ttcc-utility-btn:focus,
.toozly-ttcc-copy-output-btn:focus {
    outline: 2px solid #1A73E8;
    outline-offset: 2px;
}

/* Loading state */
.toozly-ttcc-case-btn.processing {
    background: #94a3b8;
    cursor: not-allowed;
}

.toozly-ttcc-case-btn.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: toozly-ttcc-spin 1s linear infinite;
}

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

/* Mobile responsive styles */
@media (max-width: 768px) {
    .toozly-ttcc-converter-card {
        padding: 16px;
    }

    .toozly-ttcc-button-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .toozly-ttcc-utility-buttons {
        grid-template-columns: 1fr;
    }

    .toozly-ttcc-main-textarea, 
    .toozly-ttcc-output-textarea {
        min-height: 100px;
        font-size: 14px;
    }

    .toozly-ttcc-header-title {
        font-size: 15px;
    }

    .toozly-ttcc-output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .toozly-ttcc-converter-card {
        padding: 12px;
    }

    .toozly-ttcc-success-flash {
        right: 12px;
        left: 12px;
        text-align: center;
    }
}

/* WordPress theme compatibility */
.toozly-ttcc-wrapper * {
    box-sizing: border-box;
}

.toozly-ttcc-wrapper button {
    font-family: inherit;
}

.toozly-ttcc-wrapper textarea {
    font-family: inherit;
}

/* Prevent theme conflicts */
.toozly-ttcc-wrapper .toozly-ttcc-case-btn,
.toozly-ttcc-wrapper .toozly-ttcc-utility-btn,
.toozly-ttcc-wrapper .toozly-ttcc-copy-output-btn {
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: normal;
}