/* Frontend Styles - Calculadora de Traducciones */
.calculadora-traduccion-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 20px 0;
}

.calculator {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    margin: 0 auto;
}

.calculator h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.language-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.language-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.language-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ebff 100%);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.language-card.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    background: #667eea;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.flag {
    font-size: 40px;
    margin-bottom: 8px;
}

.lang-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.input-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.service-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.service-tab {
    padding: 10px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.3s;
    color: #666;
}

.service-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.service-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.service-category {
    display: none;
}

.service-category.active {
    display: block;
}

.service-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.service-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.service-option:hover {
    border-color: #667eea;
    transform: translateY(-3px);
}

.service-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ebff 100%);
}

.service-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #667eea;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.service-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.service-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.service-desc {
    font-size: 11px;
    color: #666;
}

.client-info-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebf5 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0 20px 0;
    border: 2px solid #667eea;
}

.section-title {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

.section-subtitle {
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.result {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    display: none;
}

.result.show {
    display: block;
}

.result h2 {
    color: #333;
    margin-bottom: 15px;
}

.price-breakdown {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #666;
}

.price-item.total {
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700;
    color: #333;
}

.final-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    text-align: center;
    margin-top: 15px;
}

.download-pdf-btn {
    width: 100%;
    padding: 14px 20px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-pdf-btn:hover {
    background: #27ae60;
}

.pdf-icon {
    width: 20px;
    height: 20px;
}

.note {
    background: #fff3cd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 13px;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.payment-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.payment-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

.payment-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-btn {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.stripe-btn {
    background: #635bff;
    color: white;
}

.paypal-btn {
    background: #0070ba;
    color: white;
}

.hidden {
    display: none;
}

.file-upload-area {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: #f8f9ff;
}

.upload-placeholder {
    padding: 20px;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-text {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-formats {
    color: #666;
    font-size: 12px;
}

.file-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #667eea;
}

.file-name {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.file-words {
    color: #667eea;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.word-count {
    text-align: right;
    color: #667eea;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

@media (max-width: 600px) {
    .calculator {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .input-toggle {
        flex-direction: column;
    }
}

/* Terms and Conditions Styles */
.terms-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0 20px 0;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.checkbox-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.terms-note {
    margin: 10px 0 0 32px;
    font-size: 12px;
    color: #856404;
}

/* Modal Styles */
.terms-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.terms-modal.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.terms-modal-content {
    background-color: white;
    margin: 3% auto;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.terms-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.terms-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    line-height: 30px;
    transition: transform 0.2s;
}

.terms-modal-close:hover {
    transform: scale(1.2);
}

.terms-modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 250px);
}

.terms-content {
    padding: 30px;
    line-height: 1.8;
    color: #333;
}

.terms-content h3 {
    color: #667eea;
    margin-top: 0;
    font-size: 24px;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.terms-content h4 {
    color: #764ba2;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
}

.terms-content p {
    margin: 10px 0;
    text-align: justify;
}

.terms-content ul, .terms-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.terms-content li {
    margin: 8px 0;
}

.terms-content strong {
    color: #667eea;
}

.terms-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.terms-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.scroll-indicator {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.scroll-indicator.hidden {
    display: none;
}

.terms-accept-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.terms-accept-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.terms-accept-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

@media (max-width: 768px) {
    .terms-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .terms-modal-header {
        padding: 20px;
    }
    
    .terms-modal-header h2 {
        font-size: 18px;
    }
    
    .terms-content {
        padding: 20px;
    }
}

