/**
 * 24x7 Translations Frontend Styles
 * Based on 24x7translations.com design
 */

/* Variables - Color Scheme */
:root {
    --tx7-orange: #FD5900;
    --tx7-orange-dark: #E54D00;
    --tx7-orange-light: #FF6B1A;
    --tx7-gray-dark: #333333;
    --tx7-gray-medium: #666666;
    --tx7-gray-light: #CCCCCC;
    --tx7-white: #FFFFFF;
    --tx7-bg-light: #FAFAFA;
    --tx7-border: #E5E5E5;
    --tx7-success: #10B981;
    --tx7-error: #EF4444;
    --tx7-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --tx7-shadow-hover: 0 4px 12px rgba(253, 89, 0, 0.2);
}

/* Container */
.tx7-translator-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--tx7-white);
    border-radius: 8px;
    box-shadow: var(--tx7-shadow);
}

.tx7-translator-container.tx7-widget {
    padding: 12px 16px;
    max-width: 100%;
}

/* Main Content Container */
.tx7-main-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Upload Area */
.tx7-upload-area {
    border: 2px dashed var(--tx7-border);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    background: var(--tx7-bg-light);
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.tx7-upload-area.drag-over {
    border-color: var(--tx7-orange);
    background: rgba(255, 107, 53, 0.05);
}

.tx7-upload-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tx7-upload-icon {
    color: var(--tx7-orange);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.tx7-upload-text-group {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.tx7-upload-text {
    font-size: 13px;
    color: var(--tx7-gray-dark);
    margin: 0 0 4px 0;
}

.tx7-upload-text strong {
    font-weight: 600;
}

.tx7-upload-or {
    font-weight: normal;
    color: var(--tx7-gray-medium);
}

.tx7-file-info {
    font-size: 11px;
    color: var(--tx7-gray-medium);
    margin: 0;
}

.tx7-upload-content .tx7-btn {
    margin: 0;
    flex-shrink: 0;
}

/* File Preview */
.tx7-file-preview {
    padding: 10px 12px;
    background: var(--tx7-white);
    border-radius: 6px;
    border: 1px solid var(--tx7-border);
}

.tx7-file-info-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tx7-file-icon {
    color: var(--tx7-orange);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.tx7-file-details {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.tx7-file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx7-gray-dark);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx7-file-size {
    font-size: 11px;
    color: var(--tx7-gray-medium);
    margin: 0;
}

.tx7-btn-translate {
    width: 100%;
    margin-top: 0;
}

.tx7-btn-remove {
    background: transparent;
    border: none;
    color: var(--tx7-gray-medium);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx7-btn-remove:hover {
    background: var(--tx7-bg-light);
    color: var(--tx7-error);
}

/* Language Selectors */
.tx7-language-selectors {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tx7-language-selector {
    flex: 1;
    min-width: 160px;
}

.tx7-language-selector label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--tx7-gray-dark);
    margin-bottom: 5px;
}

.tx7-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    font-size: 14px;
    border: 1.5px solid var(--tx7-border);
    border-radius: 6px;
    background: var(--tx7-white);
    color: var(--tx7-gray-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.tx7-select:focus {
    outline: none;
    border-color: var(--tx7-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

.tx7-language-arrow {
    color: var(--tx7-orange);
    margin-bottom: 24px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Translation Complete Section */
.tx7-translation-complete {
    margin-top: 16px;
}

.tx7-translation-loading {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.tx7-translation-loading p {
    font-size: 12px;
    color: var(--tx7-gray-medium);
    margin: 0;
}

.tx7-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--tx7-border);
    border-top-color: var(--tx7-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Premium Banner */
.tx7-premium-banner {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(253, 89, 0, 0.1) 0%, rgba(253, 89, 0, 0.05) 100%);
    border: 2px solid var(--tx7-orange);
    border-radius: 12px;
}

.tx7-premium-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tx7-premium-icon {
    color: var(--tx7-orange);
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.tx7-premium-text {
    flex: 1;
    min-width: 200px;
}

.tx7-premium-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tx7-gray-dark);
    margin: 0 0 6px 0;
}

.tx7-premium-text p {
    font-size: 13px;
    color: var(--tx7-gray-medium);
    margin: 0;
    line-height: 1.5;
}

.tx7-btn-premium {
    flex-shrink: 0;
}

.tx7-free-trial-badge svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Download Section */
.tx7-download-section {
    text-align: center;
    padding: 20px 10px;
}

#tx7-download-button {
    cursor: pointer;
}

/* Registration Modal */
.tx7-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.tx7-modal-content {
    background: var(--tx7-white);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.tx7-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--tx7-gray-medium);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.tx7-modal-close:hover {
    background: var(--tx7-bg-light);
    color: var(--tx7-gray-dark);
}

.tx7-modal-close svg {
    width: 20px;
    height: 20px;
}

.tx7-modal-body {
    padding: 40px 32px 32px;
    text-align: center;
}

.tx7-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(253, 89, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tx7-orange);
}

.tx7-modal-icon svg {
    width: 32px;
    height: 32px;
}

.tx7-modal-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tx7-gray-dark);
    margin: 0 0 12px 0;
}

.tx7-modal-body > p {
    font-size: 14px;
    color: var(--tx7-gray-medium);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.tx7-modal-note {
    font-size: 12px;
    color: var(--tx7-gray-medium);
    margin: 16px 0 0 0;
}

.tx7-btn-register {
    width: 100%;
}

.tx7-success-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tx7-success);
}

.tx7-success-icon svg {
    width: 20px;
    height: 20px;
}

.tx7-download-text {
    font-size: 13px;
    color: var(--tx7-gray-dark);
    margin: 0 0 6px 0;
    font-weight: 600;
}

.tx7-watermark-notice {
    font-size: 11px;
    color: var(--tx7-gray-medium);
    margin: 0 0 12px 0;
}

/* Payment Section */
.tx7-payment-section {
    max-width: 100%;
    margin: 0 auto;
}

.tx7-price-calculator {
    background: var(--tx7-bg-light);
    border: 1.5px solid var(--tx7-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.tx7-price-info {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--tx7-border);
}

.tx7-page-count-label {
    font-size: 12px;
    color: var(--tx7-gray-medium);
    margin: 0 0 6px 0;
}

.tx7-page-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--tx7-orange);
    margin: 0;
}

.tx7-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx7-price-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--tx7-gray-dark);
}

.tx7-price-line.tx7-price-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1.5px solid var(--tx7-border);
    font-size: 16px;
    font-weight: 700;
    color: var(--tx7-orange);
}

/* Buttons */
.tx7-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.tx7-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tx7-btn-primary {
    background: var(--tx7-orange);
    color: #FFFEF8;
}

.tx7-btn-primary:hover:not(:disabled) {
    background: var(--tx7-orange-dark);
    box-shadow: 0 2px 8px rgba(253, 89, 0, 0.3);
}

.tx7-btn-secondary {
    background: var(--tx7-white);
    color: var(--tx7-gray-dark);
    border: 1.5px solid var(--tx7-border);
    border-radius: 50px;
}

.tx7-btn-secondary:hover:not(:disabled) {
    background: var(--tx7-bg-light);
    border-color: var(--tx7-gray-light);
}

.tx7-btn-link {
    background: transparent;
    color: var(--tx7-orange);
    text-decoration: underline;
    padding: 6px 12px;
    font-size: 13px;
}

.tx7-btn-link:hover {
    color: var(--tx7-orange-dark);
}

.tx7-btn-download {
    min-width: 200px;
}

/* Premium Banner Responsive */
@media (max-width: 640px) {
    .tx7-premium-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tx7-premium-text {
        min-width: 100%;
    }
    
    .tx7-btn-premium {
        width: 100%;
    }
}

/* Error Message */
.tx7-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid var(--tx7-error);
    border-radius: 6px;
    color: var(--tx7-error);
    margin-bottom: 16px;
    font-size: 13px;
}

.tx7-error-message svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .tx7-translator-container {
        padding: 12px 12px;
    }
    
    .tx7-title {
        font-size: 15px;
    }
    
    .tx7-subtitle {
        font-size: 11px;
    }
    
    .tx7-upload-area {
        padding: 12px;
    }
    
    .tx7-upload-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .tx7-language-selectors {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .tx7-language-selector {
        min-width: 100%;
    }
    
    .tx7-language-arrow {
        transform: rotate(90deg);
        margin: -4px auto 4px;
    }
    
    .tx7-step-actions {
        flex-direction: column;
    }
    
    .tx7-btn {
        width: 100%;
    }
    
    .tx7-preview-container {
        min-height: 100px;
    }
    
    .tx7-preview-text {
        max-height: 100px;
        font-size: 11px;
    }
    
}

