/**
 * Social Proof Frontend Styles - Full Screen Tool
 * 
 * Styles for the full-screen declension interface
 */

/* Full-Screen Layout */
.social-proof-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.tool-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tool-header p {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
    margin: 0;
}

.close-tool {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.close-tool:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    flex: 1;
}

.input-panel, .output-panel {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255,255,255,0.18);
}

.panel-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.panel-icon {
    margin-right: 12px;
    font-size: 28px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-input, .form-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.help-text {
    font-size: 14px;
    color: #718096;
    margin-top: 8px;
}

.debug-info {
    background: #f0f4f8;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.debug-info code {
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 4px;
}

/* AI Section */
.ai-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.ai-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.ai-icon {
    font-size: 24px;
    margin-right: 12px;
}

.ai-title {
    font-size: 18px;
    font-weight: 600;
}

.ai-description {
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.generate-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.generate-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-icon {
    margin-right: 8px;
    font-size: 18px;
}

.btn-text {
    display: inline;
}

.btn-loading {
    display: none;
}

.generate-btn:disabled .btn-text {
    display: none;
}

.generate-btn:disabled .btn-loading {
    display: inline;
}

/* Status Messages */
.status-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
    font-weight: 500;
    border: 2px solid transparent;
}

.status-success {
    background: #f0fff4;
    color: #22543d;
    border-color: #9ae6b4;
}

.status-error {
    background: #fed7d7;
    color: #c53030;
    border-color: #fc8181;
}

.status-info {
    background: #ebf8ff;
    color: #2b6cb0;
    border-color: #90cdf4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.empty-description {
    font-size: 16px;
    line-height: 1.6;
}

/* Rules Container */
.rules-container {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 300px;
}

.rule-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid #6366f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rule-header {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 8px;
}

.rule-text {
    font-size: 16px;
    color: #2d3748;
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: 'SF Mono', Monaco, monospace;
}

.word-changes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.word-tag {
    background: #e6fffa;
    color: #285e61;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s;
}

.tab.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Preview Section */
.preview-section {
    background: #2d3748;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 12px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 200px;
}

.preview-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.preview-input {
    color: #a0aec0;
}

.preview-arrow {
    color: #48bb78;
    margin: 0 12px;
    font-weight: bold;
}

.preview-output {
    color: #48bb78;
}

/* JSON Editor */
.json-editor {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #f8f9fa;
    resize: vertical;
}

.json-editor:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
}

.json-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5046e5;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .tool-container {
        padding: 20px 15px;
    }
    
    .tool-header h1 {
        font-size: 32px;
    }
    
    .input-panel, .output-panel {
        padding: 24px;
    }
    
    .form-input, .form-select {
        padding: 12px;
        font-size: 16px;
    }
    
    .generate-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    .panel-title {
        font-size: 20px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .tab {
        text-align: center;
    }
    
    .json-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .close-tool {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .tool-header h1 {
        font-size: 28px;
    }
    
    .tool-header p {
        font-size: 16px;
    }
    
    .input-panel, .output-panel {
        padding: 20px;
        border-radius: 16px;
    }
    
    .ai-section {
        padding: 20px;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-icon {
        font-size: 48px;
    }
    
    .empty-title {
        font-size: 18px;
    }
    
    .rule-item {
        padding: 16px;
    }
    
    .preview-section {
        padding: 20px;
    }
    
    .json-editor {
        padding: 16px;
        min-height: 250px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 200px; }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .input-panel, .output-panel {
        border: 2px solid #000;
    }
    
    .generate-btn {
        border: 2px solid #000;
    }
    
    .form-input, .form-select {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    .social-proof-fullscreen {
        position: static;
        background: white;
    }
    
    .close-tool {
        display: none;
    }
    
    .generate-btn {
        display: none;
    }
}