/**
 * Estilos do Conversor de Pressão Mansul
 * Cores baseadas na identidade visual da Mansul
 */

.conversor-pressao-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.conversor-titulo {
    text-align: center;
    color: #003366;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversor-pressao-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.1);
    border: 2px solid #e8eef4;
}

/* Seletor de tipo de conversão */
.conversor-tipo-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tipo-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 10px;
    border: 2px solid #d1dce6;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    color: #003366;
}

.tipo-btn:hover {
    border-color: #0066cc;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.tipo-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #003366 100%);
    border-color: #003366;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.tipo-label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tipo-btn:not(.active) .tipo-label {
    color: #003366;
}

.tipo-btn.active .tipo-label {
    color: white;
}

.tipo-formula {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
    white-space: nowrap;
}

.tipo-btn:not(.active) .tipo-formula {
    color: #4a5568;
    opacity: 0.9;
}

.tipo-btn.active .tipo-formula {
    color: white;
    opacity: 0.8;
}

/* Campos de entrada e resultado */
.conversor-input-group,
.conversor-resultado-group {
    margin-bottom: 20px;
}

.conversor-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #003366;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-unidade-entrada,
.label-unidade-saida {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #0066cc 0%, #003366 100%);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.conversor-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #d1dce6;
    border-radius: 10px !important;
    font-size: 24px;
    font-weight: 600;
    color: #003366;
    background: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.conversor-input:focus {
    outline: none;
    border-color: #0066cc;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.conversor-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Botão de inversão */
.conversor-icon {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-inverter {
    background: #ffffff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    width: auto;
    height: auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
    color: #0066cc;
    font-size: 14px;
    font-weight: 600;
}

.btn-inverter:hover {
    background: linear-gradient(135deg, #0066cc 0%, #003366 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-inverter:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.btn-inverter svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-inverter:hover svg {
    transform: rotate(180deg);
}

.btn-inverter.rotating svg {
    animation: spin 0.5s ease;
}

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

/* Resultado */
.conversor-resultado {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border: 2px solid #0066cc;
    border-radius: 8px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#conversor-valor-saida {
    font-size: 32px;
    font-weight: 700;
    color: #003366;
    display: inline-block;
    transition: all 0.3s ease;
}

#conversor-valor-saida.updating {
    animation: resultUpdate 0.3s ease;
}

@keyframes resultUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        color: #0066cc;
    }
    100% {
        transform: scale(1);
    }
}

/* Informações adicionais */
.conversor-info {
    margin-top: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 2px solid #0066cc;
}

.info-item {
    margin-bottom: 15px;
    font-size: 14px;
    color: #4a5568;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: #003366;
    display: block;
    margin-bottom: 8px;
}

#formula-display {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    color: #0066cc;
    font-weight: 600;
    border: 1px solid #d1dce6;
}

.info-equivalencias ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-equivalencias li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.info-equivalencias li:before {
    content: "•";
    position: absolute;
    left: 5px;
    color: #0066cc;
    font-weight: bold;
}

/* Botão de limpar */
.conversor-limpar {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #e8eef4;
    border: 2px solid #d1dce6;
    border-radius: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversor-limpar:hover {
    background: #cbd5e0;
    border-color: #a0aec0;
    color: #2d3748;
}

/* Responsividade */
@media (max-width: 768px) {
    .conversor-pressao-wrapper {
        padding: 15px;
    }
    
    .conversor-titulo {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .conversor-pressao-container {
        padding: 20px;
    }
    
    .conversor-tipo-selector {
        gap: 8px;
    }
    
    .tipo-btn {
        min-width: auto;
        padding: 12px 8px;
    }
    
    .tipo-label {
        font-size: 15px;
    }
    
    .tipo-formula {
        font-size: 13px;
    }
    
    .conversor-input {
        font-size: 20px;
        padding: 12px 15px;
    }
    
    #conversor-valor-saida {
        font-size: 26px;
    }
    
    .info-item {
        font-size: 13px;
    }
    
    #formula-display {
        font-size: 15px !important;
    }
    
    .btn-inverter {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .btn-inverter svg {
        width: 16px;
        height: 16px;
    }
	.tipo-formula {
    	font-size: 14px;
	}
}

@media (max-width: 480px) {
    .conversor-pressao-container {
        padding: 15px;
    }
    
    .conversor-tipo-selector {
        gap: 5px;
    }
    
    .tipo-btn {
        padding: 10px 5px;
        min-width: 0;
        flex: 1;
    }
    
    .tipo-label {
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    
    .tipo-formula {
        font-size: 11px;
        white-space: nowrap;
    }
    
    .conversor-input {
        font-size: 18px;
        padding: 12px 15px;
    }
    
    #conversor-valor-saida {
        font-size: 24px;
    }
    
    #formula-display {
        font-size: 13px;
    }
    
    .btn-inverter {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-inverter svg {
        width: 14px;
        height: 14px;
    }
	.tipo-formula {
    	font-size: 14px;
	}
}

@media (max-width: 360px) {
    .tipo-btn {
        padding: 10px 3px;
    }
    
    .tipo-label {
        font-size: 11px;
    }
    
    .tipo-formula {
        font-size: 10px;
    }
    
    .conversor-tipo-selector {
        gap: 4px;
    }
}

/* Estados especiais */
.conversor-input:disabled,
.tipo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.conversor-input.error {
    border-color: #e53e3e;
    background: #fff5f5;
}

/* Animação de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversor-pressao-container {
    animation: fadeInUp 0.5s ease;
}