/* ==========================================================================
   LINGUAKONNECT - UI COMPONENTS & INTERACTIVE MODULES
   ========================================================================== */

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 26px;
    font-family: var(--font-body);
    font-size: 0.96rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent-coral);
    color: #FFFFFF;
    box-shadow: 0 4px 14px var(--accent-coral-glow);
}

.btn-primary:hover {
    background: var(--accent-coral-hover);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
    transform: translateY(-2px);
    color: #FFFFFF;
}

.btn-teal {
    background: var(--accent-teal);
    color: #070D1E;
    box-shadow: 0 4px 14px var(--accent-teal-glow);
    font-weight: 700;
}

.btn-teal:hover {
    background: #22D3EE;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
    color: #070D1E;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
}

.btn-outline:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   INTERACTIVE LIVE QUOTE & ESTIMATOR CALCULATOR
   ========================================================================== */

.calculator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.calc-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.calc-header h3 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
}

.curr-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.curr-btn.active {
    background: var(--accent-teal);
    color: #070D1E;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.calc-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-select, .calc-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
    width: 100%;
}

.calc-select:focus, .calc-input:focus {
    border-color: var(--accent-teal);
    outline: none;
}

/* Service Tier Selector (Radio Cards) */
.service-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.tier-option {
    position: relative;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    cursor: pointer;
    background: var(--bg-primary);
    transition: all var(--transition-fast);
    user-select: none;
}

.tier-option:hover {
    border-color: var(--border-highlight);
}

.tier-option.selected {
    border-color: var(--accent-teal);
    background: rgba(6, 182, 212, 0.08);
}

.tier-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.tier-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}

.tier-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: block;
}

.tier-multiplier {
    font-size: 0.75rem;
    color: var(--accent-teal);
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

/* Word Count Slider & Live Paste Counter */
.word-counter-wrapper {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 24px;
}

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

.slider-header span.count-display {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-teal);
}

.calc-range {
    width: 100%;
    accent-color: var(--accent-teal);
    cursor: pointer;
}

.quick-word-presets {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.preset-chip {
    font-size: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preset-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent-teal);
}

/* Live Quote Output Bar */
.calc-result-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(244, 63, 94, 0.08));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.price-summary h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.price-summary .total-price {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.estimate-turnaround {
    font-size: 0.88rem;
    color: var(--accent-teal);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   TRANSLATION QUALITY DIFF / COMPARISON WIDGET
   ========================================================================== */

.comparison-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-top: 40px;
}

.sample-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sample-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sample-btn.active, .sample-btn:hover {
    background: var(--accent-teal);
    color: #070D1E;
    border-color: var(--accent-teal);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.comparison-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.comparison-card.highlight-card {
    border-color: var(--accent-teal);
    background: rgba(6, 182, 212, 0.04);
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.comp-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.comp-badge.raw-badge { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.comp-badge.mtpe-badge { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.comp-badge.human-badge { background: rgba(16, 185, 129, 0.15); color: #10B981; }

.comp-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 20px;
}

.comp-text mark.err {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
    padding: 2px 4px;
    border-radius: 4px;
    text-decoration: line-through;
}

.comp-text mark.fix {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    padding: 2px 4px;
    border-radius: 4px;
}

.comp-score {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   GLOBAL 50+ LANGUAGES MATRIX MODAL & EXPLORER
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 13, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-backdrop.active {
    display: flex;
    animation: modalFadeIn 0.25s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1040px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.modal-dialog-header {
    padding: 28px 36px 20px 36px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-close-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--accent-coral);
    border-color: var(--accent-coral);
    transform: rotate(90deg);
}

.modal-controls {
    padding: 20px 36px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-primary);
}

.search-input-box {
    position: relative;
}

.search-input-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-input-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.matrix-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip.active, .filter-chip:hover {
    background: var(--accent-teal);
    color: #070D1E;
    border-color: var(--accent-teal);
}

.modal-scroll-body {
    padding: 28px 36px;
    overflow-y: auto;
    flex-grow: 1;
}

.language-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.matrix-lang-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.matrix-lang-card:hover {
    border-color: var(--accent-teal);
    transform: translateY(-2px);
    background: var(--bg-surface-elevated);
}

.matrix-lang-card .lang-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.matrix-lang-card .lang-script {
    font-size: 0.8rem;
    color: var(--accent-teal);
    margin-bottom: 6px;
}

.matrix-lang-card .lang-region {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   CLIENT PORTAL & FILE UPLOAD SIMULATOR
   ========================================================================== */

.portal-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
}

.drop-zone {
    border: 2px dashed var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    background: rgba(6, 182, 212, 0.03);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 24px;
}

.drop-zone.dragover, .drop-zone:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: var(--accent-teal);
}

.drop-zone svg {
    color: var(--accent-teal);
    margin-bottom: 12px;
}

.upload-file-status {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    display: none;
}

.upload-progress-bar {
    height: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-top: 10px;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-coral));
    transition: width 0.3s ease;
}

/* Forms General */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent-teal);
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================================================
   TESTIMONIALS & CASE STUDIES
   ========================================================================== */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-quote {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-style: italic;
}

.client-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.client-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-teal);
}

.client-info h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.client-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ACCORDION (FAQ)
   ========================================================================== */

.faq-container {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-item.active {
    border-color: var(--border-highlight);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.faq-icon {
    font-size: 1.2rem;
    color: var(--accent-teal);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent-coral);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.65;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 250px;
    padding: 0 24px 20px 24px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success {
    border-left: 4px solid var(--accent-emerald);
}

.toast.info {
    border-left: 4px solid var(--accent-teal);
}

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

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