/* Text Case Converter Tool Styles */

/* Reset for our tool only */
.text-case-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Tool Description Section */
.tool-description-section {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 40px 0 20px;
    margin-bottom: 0;
}

.tools-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.tool-main-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.tool-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
}

/* Start Converting CTA */
.start-converting-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 10px 0 25px 0;
}

.start-converting-cta .cta-icon {
    font-size: 1.5rem;
    color: #f1c40f;
    animation: subtleBounce 2s infinite;
}

.start-converting-cta .cta-text {
    font-size: 1.2rem;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

@keyframes subtleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Internal Tools Links */
.internal-tools-links {
    margin: 20px auto 30px auto;
    max-width: 500px;
    text-align: center;
}

.internal-tools-links h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tools-quick-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tool-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tool-quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.tool-quick-icon {
    font-size: 1.2rem;
}

/* Ad Container Styles */
.ad-container {
    margin: 25px 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eaeaea;
}

.ad-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-unit {
    margin: 0 auto;
    overflow: hidden;
}

/* Hide mobile ads on desktop */
@media (min-width: 769px) {
    .ad-mobile {
        display: none !important;
    }
}

/* Show mobile ads on mobile */
@media (max-width: 768px) {
    .ad-desktop {
        display: none !important;
    }
    .ad-container {
        margin: 20px 0;
        padding: 12px;
    }
}

/* Main Container */
.text-case-container {
    background-color: #f5f7fa;
    padding: 20px 0 40px;
    width: 100%;
}

/* Layout - Tool and Sidebar */
.tool-layout {
    display: flex;
    gap: 30px;
    position: relative;
    margin-top: 20px;
}

.main-content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-area {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Input Section */
.input-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    width: 100%;
}

.input-section h2 {
    color: #9b59b6;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.5rem;
}

#textCaseInput {
    width: 100%;
    min-height: 200px;
    padding: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    transition: border 0.3s;
    line-height: 1.6;
    font-family: inherit;
    margin-bottom: 10px;
}

#textCaseInput:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 20px 0;
    padding: 8px 12px;
    background-color: #f5f0ff;
    border: 1px solid #d8c9ff;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6f42c1;
    line-height: 1.3;
}

.privacy-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.privacy-text {
    line-height: 1.3;
}

/* Case Selection */
.case-selection {
    margin-bottom: 25px;
}

.case-selection h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.case-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.case-btn {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.case-btn:hover {
    border-color: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.1);
}

.case-btn.active {
    background: #9b59b6;
    border-color: #9b59b6;
    color: white;
}

.case-icon {
    font-size: 1.2rem;
}

/* Text Controls */
.text-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.file-info {
    font-size: 0.9rem;
    color: #666;
}

.text-case-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.text-case-buttons .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-align: center;
}

.btn-icon {
    font-size: 1.1rem;
}

.text-case-buttons .btn-primary {
    background-color: #9b59b6;
    color: white;
}

.text-case-buttons .btn-primary:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.2);
}

.text-case-buttons .btn-secondary {
    background-color: #ecf0f1;
    color: #34495e;
}

.text-case-buttons .btn-secondary:hover {
    background-color: #d5dbdb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-case-buttons .btn-clear {
    background-color: #e74c3c;
    color: white;
}

.text-case-buttons .btn-clear:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

/* Results Section */
.results-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    width: 100%;
}

.results-section h2 {
    color: #9b59b6;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.converted-text-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.case-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.case-label {
    font-weight: 600;
    color: #2c3e50;
}

.case-value {
    font-weight: 700;
    color: #9b59b6;
    text-transform: uppercase;
}

#textCaseOutput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    line-height: 1.6;
    font-family: inherit;
    margin-bottom: 15px;
    resize: vertical;
}

.conversion-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Loading Spinner */
.text-case-loading {
    display: none;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #9b59b6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.text-case-loading p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.95rem;
}

/* Sidebar Styles */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sticky-ad {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-list, .tools-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.tips-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li strong {
    color: #9b59b6;
}

.tools-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tools-list li:last-child {
    border-bottom: none;
}

.tools-list a {
    color: #9b59b6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: block;
}

.tools-list a:hover {
    color: #8e44ad;
    text-decoration: underline;
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.related-tools-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #9b59b6;
}

.tool-card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tool-card-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.tool-card-desc {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.tool-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-tag {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-card-link {
    display: inline-block;
    padding: 12px 25px;
    background: #9b59b6;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.tool-card-link:hover {
    background: #8e44ad;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.faq-question {
    width: 100%;
    padding: 18px 0;
    text-align: left;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: color 0.3s;
}

.faq-question:hover {
    color: #9b59b6;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
    color: #9b59b6;
}

.faq-question.active::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-question.active + .faq-answer {
    max-height: 500px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.faq-answer-content {
    padding: 0 0 20px 0;
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Export Options */
.export-options {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.export-options h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

/* Breadcrumb Navigation */
.breadcrumb-container {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    padding: 12px 0;
    margin-bottom: 20px;
}

.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #9b59b6;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    background-color: rgba(155, 89, 182, 0.1);
    color: #8e44ad;
    text-decoration: underline;
}

.breadcrumb-current {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    color: #7f8c8d;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #bdc3c7;
    font-size: 0.8rem;
    padding: 0 2px;
}

.breadcrumb-icon {
    font-size: 0.9rem;
}

/* Responsive Design */
/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .tool-layout {
        flex-direction: column;
    }
    
    .sidebar-area {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
        order: 2;
    }
    
    .sticky-ad {
        position: static;
    }
    
    .main-content-area {
        order: 1;
    }
    
    .tool-main-title {
        font-size: 2.2rem;
    }
    
    .case-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles (max 767px) */
@media (max-width: 767px) {
    .tool-description-section {
        padding: 30px 0 15px;
    }
    
    .tool-main-title {
        font-size: 1.8rem;
    }
    
    .tool-subtitle {
        font-size: 1rem;
    }
    
    .start-converting-cta .cta-text {
        font-size: 1rem;
        padding: 6px 15px;
    }
    
    .tools-quick-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .input-section,
    .results-section,
    .related-tools-section,
    .faq-section {
        padding: 20px;
    }
    
    .input-section h2,
    .results-section h2,
    .related-tools-section h2,
    .faq-section h2 {
        font-size: 1.4rem;
    }
    
    .case-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .text-case-buttons {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-area {
        grid-template-columns: 1fr;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px 0;
    }
    
    .conversion-stats {
        grid-template-columns: 1fr;
    }
    
    .file-upload {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #textCaseInput,
    #textCaseOutput {
        min-height: 150px;
        padding: 15px;
        font-size: 15px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .tool-main-title {
        font-size: 1.6rem;
    }
    
    .tool-subtitle {
        font-size: 0.95rem;
    }
    
    .section-icon {
        font-size: 1.3rem;
    }
    
    .case-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .ad-container {
        padding: 10px;
    }
}

/* Textarea with floating copy button */
.textarea-with-copy {
    position: relative;
    margin-bottom: 15px;
}

.textarea-with-copy textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    padding-right: 90px; /* Make space for the button */
}

.copy-inside-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-inside-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(142, 68, 173, 0.2);
}

.copy-inside-btn:active {
    transform: translateY(0);
}

.copy-icon {
    font-size: 1rem;
}

.copy-text {
    font-size: 0.9rem;
}

/* Success state */
.copy-inside-btn.copied {
    background: #2ecc71;
}

.copy-inside-btn.copied .copy-icon {
    content: '✓';
}

/* Responsive design */
@media (max-width: 767px) {
    .textarea-with-copy textarea {
        padding-right: 80px; /* Less space on mobile */
        min-height: 150px;
    }
    
    .copy-inside-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .copy-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .textarea-with-copy textarea {
        padding-right: 70px;
    }
    
    .copy-inside-btn {
        padding: 5px 10px;
    }
    
    .copy-text {
        display: none; /* Hide text, show only icon on small screens */
    }
    
    .copy-inside-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        justify-content: center;
    }
}