/* Portuguese Text Corrector Plugin Styles */
.ptc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.ptc-header {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    color: white;
}

.ptc-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ptc-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ptc-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ptc-logo-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.ptc-logo-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.ptc-language {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

/* Main Content */
.ptc-main {
    margin-bottom: 32px;
}

.ptc-intro {
    text-align: center;
    margin-bottom: 32px;
}

.ptc-intro h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #1f2937;
}

.ptc-intro p {
    font-size: 18px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.ptc-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Card Styles */
.ptc-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 24px;
}

.ptc-card-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ptc-input-header {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: white;
}

.ptc-output-header {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
}

.ptc-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptc-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ptc-card-content {
    padding: 24px;
}

/* Input Styles */
#ptc-input-text {
    width: 100%;
    height: 200px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
    font-family: inherit;
}

#ptc-input-text:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ptc-char-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

.ptc-warning {
    margin-top: 8px;
    font-size: 12px;
    color: #f59e0b;
}

/* Mode Selection */
.ptc-mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.ptc-mode-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ptc-mode-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.ptc-mode-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

.ptc-mode-btn.active[data-mode="rewrite"] {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.ptc-mode-title {
    font-weight: 600;
    font-size: 14px;
}

.ptc-mode-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Style Selection */
.ptc-style-selection {
    margin-bottom: 24px;
}

.ptc-style-selection h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.ptc-style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ptc-style-btn {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ptc-style-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.ptc-style-btn.active {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.ptc-style-title {
    font-weight: 600;
    font-size: 13px;
}

.ptc-style-desc {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* Process Button */
.ptc-process-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ptc-process-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.3);
}

.ptc-process-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ptc-process-btn[data-mode="rewrite"]:not(:disabled) {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.ptc-process-btn[data-mode="rewrite"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 8px 16px -4px rgba(16, 185, 129, 0.3);
}

.ptc-spinner {
    animation: spin 1s linear infinite;
}

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

/* Output Styles */
.ptc-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ptc-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ptc-copy-btn.copied {
    background: #10b981;
}

#ptc-output-content {
    min-height: 200px;
}

.ptc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #9ca3af;
    text-align: center;
}

.ptc-placeholder svg {
    margin-bottom: 12px;
}

.ptc-result {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.6;
    color: #374151;
}

.ptc-success {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: #10b981;
    font-size: 14px;
}

.ptc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    gap: 16px;
}

.ptc-loading svg {
    color: #3b82f6;
}

.ptc-loading-text {
    text-align: center;
}

.ptc-loading-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.ptc-loading-desc {
    font-size: 14px;
    color: #6b7280;
}

/* Footer */
.ptc-footer {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
}

.ptc-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ptc-footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.ptc-footer-item svg:first-child {
    color: #ef4444;
}

.ptc-footer-item:last-child svg {
    color: #10b981;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ptc-container {
        padding: 16px;
    }
    
    .ptc-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .ptc-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ptc-intro h2 {
        font-size: 24px;
    }
    
    .ptc-intro p {
        font-size: 16px;
    }
    
    .ptc-mode-selection {
        grid-template-columns: 1fr;
    }
    
    .ptc-style-grid {
        grid-template-columns: 1fr;
    }
    
    .ptc-footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ptc-card-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .ptc-header {
        padding: 16px;
    }
    
    .ptc-logo {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .ptc-logo-text h1 {
        font-size: 20px;
    }
    
    .ptc-intro h2 {
        font-size: 20px;
    }
    
    .ptc-mode-btn {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}